Skip to content

Commit a4eb461

Browse files
authored
🥅 Wrap controller methods (#200)
Resolves #199.
1 parent 94f9e9d commit a4eb461

File tree

6 files changed

+171
-64
lines changed

6 files changed

+171
-64
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ that can be found in the LICENSE file. -->
66

77
See the [Migration Guide](guides/migration_guide.md) for the details of breaking changes between versions.
88

9-
## Unreleased
9+
## 4.0.3
1010

1111
### Fixes
1212

1313
- Prevent duplicate shooting actions.
1414

15+
### Improvements
16+
17+
- Provide overall invalid wrapping for controller methods.
18+
- Throw exceptions with more accurate stack traces.
19+
1520
## 4.0.2
1621

1722
### Fixes

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wechat_camera_picker_demo
22
description: A new Flutter project.
3-
version: 4.0.2+27
3+
version: 4.0.3+28
44
publish_to: none
55

66
environment:

lib/src/internals/methods.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ void realDebugPrint(dynamic message) {
1818

1919
void handleErrorWithHandler(
2020
Object e,
21-
CameraErrorHandler? handler, {
22-
StackTrace? s,
23-
}) {
21+
StackTrace s,
22+
CameraErrorHandler? handler,
23+
) {
2424
if (handler != null) {
2525
handler(e, s);
2626
return;
2727
}
28-
throw e;
28+
Error.throwWithStackTrace(e, s);
2929
}
3030

3131
T? ambiguate<T>(T value) => value;

0 commit comments

Comments
 (0)