sample_exception 1.0.2 sample_exception: ^1.0.2 copied to clipboard
Define a generic exception for all project and library. help the Developer code easer with error and exception.
Getting started #
Add dependency to your pubspec.yaml:
custom_state: 'any'
Usage #
Import packages:
import 'package:sample_exception/sample_exception.dart';
Exception: #
final exception = SampleException(
SampleErrorCode.unknown,
error: Exception("Sample error"),
message: 'Test sample error',
stackTrace: StackTrace.current,
time: DateTime.now(),
);
- print log
exception.print();
- throw exception
throw exception;
Features and bugs #
Please file feature requests and bugs at the issue tracker.