File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
/// An abstract class for identifying the type of Dart errors and exceptions.
2
2
///
3
- /// This class provides a contract for implementing error type identification
4
- /// in Dart. It's used in scenarios where error types need to be
5
- /// determined in obfuscated builds, as [runtimeType] is not reliable in
6
- /// such cases.
3
+ /// It's used in scenarios where error types need to be determined in obfuscated builds
4
+ /// as [runtimeType] is not reliable in such cases.
7
5
///
8
6
/// Implement this class to create custom error type identifiers for errors or exceptions.
9
7
/// that we do not support out of the box.
12
10
///
13
11
/// Example:
14
12
/// ```dart
15
- /// class MyErrorTypeIdentifier implements ErrorTypeIdentifier {
13
+ /// class MyExceptionTypeIdentifier implements ExceptionTypeIdentifier {
16
14
/// @override
17
- /// String? identifyType(dynamic error ) {
18
- /// if (error is MyCustomError) return 'MyCustomError';
15
+ /// String? identifyType(dynamic throwable ) {
16
+ /// if (throwable is MyCustomError) return 'MyCustomError';
19
17
/// return null;
20
18
/// }
21
19
/// }
You can’t perform that action at this time.
0 commit comments