AppError
FitFileViewer - API Documentation v29.4.0
FitFileViewer - API Documentation / utils/errors/errorHandling / AppError
Class: AppError
Defined in: utils/errors/errorHandling.js:52
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:58
Create an application error
Parametersβ
messageβ
string
Error message
context?β
ErrorContext = {}
Additional error context
Returnsβ
AppError
Overridesβ
Error.constructor
Propertiesβ
nameβ
name:
string
Defined in: utils/errors/errorHandling.js:60
Inherited fromβ
Error.name
contextβ
context:
ErrorContext
Defined in: utils/errors/errorHandling.js:61
timestampβ
timestamp:
number
Defined in: utils/errors/errorHandling.js:62
Methodsβ
getFormattedMessage()β
getFormattedMessage():
string
Defined in: utils/errors/errorHandling.js:69
Get a formatted error message with context
Returnsβ
string
Formatted error message
toJSON()β
toJSON():
Object
Defined in: utils/errors/errorHandling.js:91
Convert error to JSON for logging/serialization
Returnsβ
Object
JSON representation