Blame view

lib/common/extension/exception_ext.dart 374 Bytes
bcd47f52   Key   fixed: 接口list范型支持
1
2
3
4
5
6
  import 'package:wow_english/common/request/exception.dart';
  
  extension ExceptionExtension on Exception {
    String get getShowMessage {
      if (this is ApiException) {
        return (this as ApiException).message ?? '未知错误';
bc0550ae   Key   fixed: avatar修改
7
8
      } else if (this is FormatException) {
        return (this as FormatException).message;
bcd47f52   Key   fixed: 接口list范型支持
9
10
11
12
13
      } else {
        return '未知错误';
      }
    }
  }