get()
Returns the `Error` instance of the given unique identification
Last updated
// Example usage.
import { Errors } from '@angular-package/error';
// Define general errors.
const generalErrors = new Errors('EG: 4332', 'EG: 4331', 'EG: 4330');
// Set the `Error` objects under the given identification numbers.
generalErrors
.set(
'Bad parameter type, detected number',
'Provide proper type, the `string`',
'EG: 4330'
)
.set('Detected numbers', 'Provide only letters', 'EG: 4331');
// Returns the Error<"EG: 4330">.
generalErrors.get('EG: 4330');