mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: migrate src/Errors to TypeScript (#5725)
This commit is contained in:
parent
30aff827ea
commit
930cc32baf
@ -15,15 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class CustomError extends Error {
|
class CustomError extends Error {
|
||||||
constructor(message) {
|
constructor(message: string) {
|
||||||
super(message);
|
super(message);
|
||||||
this.name = this.constructor.name;
|
this.name = this.constructor.name;
|
||||||
Error.captureStackTrace(this, this.constructor);
|
Error.captureStackTrace(this, this.constructor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TimeoutError extends CustomError {}
|
export class TimeoutError extends CustomError {}
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
TimeoutError,
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user