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