mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
14 lines
226 B
JavaScript
14 lines
226 B
JavaScript
class CustomError {
|
|
constructor(message, data) {
|
|
this.message = message
|
|
this.data = data
|
|
}
|
|
toString() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
export default () => {
|
|
throw new CustomError('custom error message', {})
|
|
}
|