my_exception.dart 343 B

123456789101112131415161718
  1. import 'dart:core';
  2. /// @author: bo.zeng
  3. /// @email: cnhbwds@gmail.com
  4. /// @date: 2025 2025/4/14 10:39
  5. /// @description:
  6. class MyException implements Exception {
  7. final int code;
  8. final String? msg;
  9. MyException({required this.code, this.msg});
  10. @override
  11. String toString() {
  12. return 'MyException {code: $code, msg: $msg}';
  13. }
  14. }