fbmobile/lib/core/error/service_exception.dart

13 lines
269 B
Dart
Raw Normal View History

2021-02-02 14:33:23 +00:00
import '../enums/error_code.dart';
class ServiceException implements Exception {
final ErrorCode code;
final String? message;
2021-02-02 14:33:23 +00:00
ServiceException({this.code = ErrorCode.GENERAL_ERROR, this.message = ''});
String toString() {
return "$code: $message";
}
}