File tree Expand file tree Collapse file tree 2 files changed +400
-2
lines changed Expand file tree Collapse file tree 2 files changed +400
-2
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/widgets.dart' ;
2
+ import 'package:flutter_policy_engine/flutter_policy_engine.dart' ;
2
3
import 'package:flutter_policy_engine/src/core/policy_provider.dart' ;
3
4
import 'package:flutter_policy_engine/src/exceptions/i_policy_sdk_exceptions.dart' ;
4
5
@@ -70,14 +71,17 @@ class PolicyWidget extends StatelessWidget {
70
71
} catch (e) {
71
72
if (e is IPolicySDKException ) {
72
73
assert (() {
73
- throw FlutterError ('Error en PolicyWidget: ${e .message }' );
74
+ throw PolicySDKException ('Error en PolicyWidget: ${e .message }' );
74
75
}());
75
76
76
77
// On production, deny access silently
77
78
onAccessDenied? .call ();
78
79
return fallback ?? const SizedBox .shrink ();
79
80
}
80
- rethrow ;
81
+ throw PolicySDKException (
82
+ 'Error en PolicyWidget' ,
83
+ exception: e as Exception ,
84
+ );
81
85
}
82
86
}
83
87
}
You can’t perform that action at this time.
0 commit comments