class
SQL.MySQLError
class MySQLError
- readonly code: string
Bun's error code, such as
"ERR_MYSQL_SERVER_ERROR"or"ERR_MYSQL_CONNECTION_CLOSED". It is not a name likeER_DUP_ENTRY: compare errno for that. - readonly errno?: number
The error number that the server sent, such as
1062for a duplicate entry. Not set on errors that Bun raises itself. - static stackTraceLimit: number
The
Error.stackTraceLimitproperty specifies the number of stack frames collected by a stack trace (whether generated bynew Error().stackorError.captureStackTrace(obj)).The default value is
10but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
- targetObject: object,constructorOpt?: Function): void;
Create .stack property on a target object