BasicException constructor
const
BasicException(
- String problem, {
- String name = 'UnnamedException',
- String solution = '<none>',
- ExceptionSeverity severity = ExceptionSeverity.none,
Example:
final exception = BasicException('Provided value is -26 which is negative.');
or
final exception = BasicException(
'Provided value is -26 which is negative.'
solution: 'Please provide a positive value.'
severity: ExceptionSeverity.critical,
);
Implementation
const BasicException(
this.problem, {
String name = 'UnnamedException',
this.solution = '<none>',
this.severity = ExceptionSeverity.none,
}) : key = name;