Blame view

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