End::End(End::State _state, uint64_t _ending) throw(invalid_state) : ending{_ending} , state{_state} { if(state == sS && ending >= msb) { throw invalid_state("Invalid state."); } }
Lisp_Object read_doc_string (Lisp_Object filepos) { Lisp_Object string = get_doc_string (filepos); if (!STRINGP (string)) invalid_state ("loading bytecode failed to return string", string); return Fread (string); }
End::End(End::State _state) throw(invalid_state) : state{_state} { if(state == sS) { ending = 0; } else if(state == s0) { ending = 0; } else if(state == s1) { ending = msb; } else { throw invalid_state("Invalid state."); } }
void update_operation::rollback() { // make sure the basis still exists in cache if (patched_) { if (!fs::exists(patched_path_)) { throw invalid_state("Basis no longer exists in cache, can not rollback!"); } // the file should be there.. but just in case if (fs::exists(basis_path_)) { fs::remove(basis_path_); } fs::rename(patched_path_, basis_path_); } cleanup(); }