Masamune Lints
[GitHub](https://github.com/mathrunet) | [YouTube](https://www.youtube.com/c/mathrunetchannel) | [Packages](https://pub.dev/publishers/mathru.net/packages) | [X](https://x.com/mathru) | [LinkedIn](https://www.linkedin.com/in/mathrunet/) | [mathru.net](https://mathru.net)
Plug-in packages that add functionality to the Masamune Framework.
For more information about Masamune Framework, please click here.
https://pub.dev/packages/masamune
Error handling rules
Masamune distinguishes expected and unexpected errors by catch syntax.
try {
await operation();
} on ValidationException catch (e) {
handleValidationError(e);
} catch (e, stackTrace) {
await appLogger.error(e, stackTrace);
handleUnexpectedError();
}
masamune_expected_error_should_have_unexpected_catchrequires a final untyped catch when a try statement has typed catches for expected errors.masamune_caught_error_should_reportrequires an untyped catch to report the same caught error and stack trace withappLogger.error, unless it propagates the error withrethroworthrow.- Typed
on XxxException catchclauses declare expected errors and do not require incident reporting.
GitHub Sponsors
Sponsors are always welcome. Thank you for your support!
Libraries
- masamune_lints
- Package that defines lint rules necessary for use with the Masamune framework.