File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,15 @@ inline std::string typeToString(NitroSQLiteExceptionType type) {
2828 return exceptionTypeStrings[type];
2929}
3030
31- class NitroSQLiteException : public std ::exception {
31+ class NitroSQLiteException : public std ::runtime_error {
3232public:
3333 explicit NitroSQLiteException (const char * message): NitroSQLiteException(NitroSQLiteExceptionType::UnknownError, message) {}
3434 explicit NitroSQLiteException (const std::string& message): NitroSQLiteException(NitroSQLiteExceptionType::UnknownError, message) {}
3535 NitroSQLiteException (const NitroSQLiteExceptionType& type, const char * message) : NitroSQLiteException(type, std::string(message)) {}
3636 NitroSQLiteException (const NitroSQLiteExceptionType& type, const std::string& message)
37- : _exceptionString(" [react-native-nitro-sqlite] " + typeToString(type) + " : " + message) {}
38-
39- private:
40- const std::string _exceptionString;
37+ : std::runtime_error(" [react-native-nitro-sqlite] " + typeToString(type) + " : " + message) {}
4138
4239public:
43- [[nodiscard]] const char * what () const noexcept override {
44- return this ->_exceptionString .c_str ();
45- }
46-
4740 static NitroSQLiteException DatabaseNotOpen (const std::string& dbName) {
4841 return NitroSQLiteException (NitroSQLiteExceptionType::UnableToAttachToDatabase, dbName + " is not open" );
4942 }
You can’t perform that action at this time.
0 commit comments