AppError
FitFileViewer - API Documentation v29.9.0
FitFileViewer - API Documentation / utils/errors/errorHandling / AppError
Class: AppError
Defined in: utils/errors/errorHandling.js:65
Enhanced Error class with additional context
Extendsβ
Error
Extended byβ
Constructorsβ
Constructorβ
new AppError(
message:string,context?:ErrorContext):AppError
Defined in: utils/errors/errorHandling.js:73
Create an application error
Parametersβ
messageβ
string
Error message
context?β
ErrorContext = {}
Additional error context. Default is
{}
Returnsβ
AppError
Overridesβ
Error.constructor
Propertiesβ
nameβ
name:
string
Defined in: utils/errors/errorHandling.js:75
Inherited fromβ
Error.name
contextβ
context:
ErrorContext
Defined in: utils/errors/errorHandling.js:76
timestampβ
timestamp:
number
Defined in: utils/errors/errorHandling.js:77
Methodsβ
getFormattedMessage()β
getFormattedMessage():
string
Defined in: utils/errors/errorHandling.js:85
Get a formatted error message with context
Returnsβ
string
Formatted error message
toJSON()β
toJSON():
Object
Defined in: utils/errors/errorHandling.js:108
Convert error to JSON for logging/serialization
Returnsβ
Object
JSON representation