tom_basics 1.0.0
tom_basics: ^1.0.0 copied to clipboard
Basic utilities for the TOM framework including exception handling with UUID tracking.
example/tom_basics_example.dart
import 'package:tom_basics/tom_basics.dart';
void main() {
// Configure logging
tomLog.setLogLevel(TomLogLevel.development);
tomLog.info('Application starting...');
try {
throw TomBaseException('EXAMPLE_ERROR', 'Something went wrong');
} on TomBaseException catch (e) {
tomLog.error('Caught exception: ${e.key} - ${e.defaultUserMessage}');
print('Exception UUID: ${e.uuid}');
}
tomLog.info('Application finished.');
}