@0x/utils: Add toStringTag symbol to RevertError

This commit is contained in:
Lawrence Forman 2019-06-20 21:23:05 -04:00 committed by Amir Bandeali
parent 42f7b7cc19
commit 3a49369e68
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,10 @@
{ {
"note": "Add `Error` -> `RevertError` functions", "note": "Add `Error` -> `RevertError` functions",
"pr": 1819 "pr": 1819
},
{
"note": "Add `toStringTag` symbol to `RevertError`",
"pr": "TODO"
} }
], ],
"timestamp": 1563006338 "timestamp": 1563006338

View File

@ -204,6 +204,10 @@ export abstract class RevertError extends Error {
return []; return [];
} }
get [Symbol.toStringTag](): string {
return this.toString();
}
/** /**
* Compares this instance with another. * Compares this instance with another.
* Fails if instances are not of the same type. * Fails if instances are not of the same type.