masamune_lints 3.4.0
masamune_lints: ^3.4.0 copied to clipboard
Package that defines lint rules necessary for use with the Masamune framework.
Masamune Lints
[GitHub] | [YouTube] | [Packages] | [X] | [LinkedIn] | [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!