@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
49 lines • 1.19 kB
JavaScript
/**
* @module Serde
*/
/**
*
* IMPORT_PATH: `"@daiso-tech/core/serde/contracts"`
* @group Errors
*/
export class SerdeError extends Error {
constructor(message, cause) {
super(message, { cause });
this.name = SerdeError.name;
}
}
/**
* The error occurs when a value is unable to be serialized.
*
* IMPORT_PATH: `"@daiso-tech/core/serde/contracts"`
* @group Errors
*/
export class SerializationSerdeError extends SerdeError {
constructor(message, cause) {
super(message, { cause });
this.name = SerializationSerdeError.name;
}
}
/**
* The error occurs when a value is unable to be deserialized.
*
* IMPORT_PATH: `"@daiso-tech/core/serde/contracts"`
* @group Errors
*/
export class DeserializationSerdeError extends SerdeError {
constructor(message, cause) {
super(message, { cause });
this.name = DeserializationSerdeError.name;
}
}
/**
*
* IMPORT_PATH: `"@daiso-tech/core/serde/contracts"`
* @group Errors
*/
export const SERDE_ERRORS = {
Base: SerdeError,
Serialization: SerializationSerdeError,
Deserialization: DeserializationSerdeError,
};
//# sourceMappingURL=serde.errors.js.map