Skip to content

Commit

Permalink
feat: Add throwExceptionHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Aug 12, 2024
1 parent 113abd9 commit 27529f2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/src/iris_method_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import 'package:iris_method_channel/src/platform/iris_method_channel_internal.da
// ignore_for_file: public_member_api_docs

@pragma('vm:prefer-inline')
ThrowExceptionHandler throwException = _defaultThrowExceptionBuilder;
ThrowExceptionHandler throwExceptionHandler = _defaultThrowExceptionHandler;
@pragma('vm:prefer-inline')
void _defaultThrowExceptionBuilder({required int code, String? message}) {
void _defaultThrowExceptionHandler({required int code, String? message}) {
throw Exception();
}

typedef ExceptionBuilder = Exception Function(
{required int code, String? message});

typedef ThrowExceptionHandler = void Function(
{required int code, String? message});

Expand Down

0 comments on commit 27529f2

Please sign in to comment.