The `get` accessor obtains error object name
Last updated 1 year ago
Was this helpful?
Error.prototype.name
Error name of a type, set to that is being thrown.
public get name(): string { return 'Error'; }
The return value is the error instance name of type.
// Example usage. import { Error } from '@angular-package/error'; // Returns "Error". new Error('Wrong type', 'Change the type', 'TE:201').name;
string
'Error'