fbmobile/lib/core/error/service_exception.dart

13 lines
268 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;
ServiceException({this.code = ErrorCode.GENERAL_ERROR, this.message = ''});
String toString() {
return "$code: $message";
}
}