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