File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1- const NITRO_SQLITE_ERROR_NAME = 'NitroSQLiteError'
1+ const NITRO_SQLITE_ERROR_NAME = 'NitroSQLiteError' as const
2+ const NITRO_SQLITE_ERROR_PREFIX = '[NitroSQLite] ' as const
23
34/**
45 * Custom error class for NitroSQLite operations
@@ -8,6 +9,7 @@ export default class NitroSQLiteError extends Error {
89 constructor ( message : string , options ?: ErrorOptions ) {
910 super ( message , options )
1011 this . name = NITRO_SQLITE_ERROR_NAME
12+ this . message = NITRO_SQLITE_ERROR_PREFIX + message
1113
1214 // Maintains proper prototype chain for instanceof checks
1315 Object . setPrototypeOf ( this , NitroSQLiteError . prototype )
@@ -41,12 +43,4 @@ export default class NitroSQLiteError extends Error {
4143 cause : error ,
4244 } )
4345 }
44-
45- /**
46- * Converts a native error (from C++ bridge) to a NitroSQLiteError
47- * Alias for fromError for semantic clarity
48- */
49- static fromNativeError ( error : unknown ) : NitroSQLiteError {
50- return NitroSQLiteError . fromError ( error )
51- }
5246}
You can’t perform that action at this time.
0 commit comments