sample_exception 1.0.2 copy "sample_exception: ^1.0.2" to clipboard
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.

0
likes
120
pub points
71%
popularity

Publisher

unverified uploader

Define a generic exception for all project and library. help the Developer code easer with error and exception.

Repository (GitHub)
View/report issues

Documentation

API reference

License

AGPL-3.0 (LICENSE)

More

Packages that depend on sample_exception