You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dart cannot natively handle errors, rather 'fails unexpectedly' when C throws any error.
Importance: Flutter must capture errors to alert the user to make changes, so C errors must be converted into Dart
Approach 1: ErrorTranslator 馃弳
C++ object that is always passed by reference for every function.
It should capture + handle various (if not all) error types.
From Dart, we would try to access data stored in C Memory to retrieve the current "status" of our function call / stack.
Pros:
Follows same pattern as Afhe, passed by reference with attributes
Cons:
Modifies every existing function
Approach 2: Specialized return types
For objects, create sub-routine .status() returns error message if any
For int or string return types, use -1
Cons:
Non-objects are ambiguous, less control for error messages
Prone to issues, hard coded values
The text was updated successfully, but these errors were encountered:
Dart cannot natively handle errors, rather 'fails unexpectedly' when C throws any error.
Importance: Flutter must capture errors to alert the user to make changes, so C errors must be converted into Dart
Approach 1:
ErrorTranslator
馃弳C++ object that is always passed by reference for every function.
It should capture + handle various (if not all) error types.
From Dart, we would try to access data stored in C Memory to retrieve the current "status" of our function call / stack.
Pros:
Cons:
Approach 2: Specialized return types
For objects, create sub-routine
.status()
returns error message if anyFor
int
orstring
return types, use-1
Cons:
The text was updated successfully, but these errors were encountered: