angel_http_exception 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

http_exception #

Angel's HTTP exception class.

1.1.0 #

  • Emit is_error and status_code in toJson().
    • No more camelCase at all.

1.0.0+3 #

  • Slightly relax the deserialization of errors.

1.0.0+2 #

  • Added a backwards-compatible way to cast the errors List.

1.0.0+1 #

  • Dart 2 updates.

example/main.dart

import 'package:angel_http_exception/angel_http_exception.dart';

void main() =>
    throw new AngelHttpException.notFound(message: "Can't find that page!");

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  angel_http_exception: ^1.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:angel_http_exception/angel_http_exception.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
Health:
Code health derived from static analysis. [more]
93
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Dec 5, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Health suggestions

Fix lib/angel_http_exception.dart. (-6.78 points)

Analysis of lib/angel_http_exception.dart reported 14 hints, including:

line 52 col 12: Unnecessary new keyword.

line 63 col 7: Unnecessary new keyword.

line 70 col 7: Unnecessary new keyword.

line 76 col 7: Unnecessary new keyword.

line 81 col 7: Unnecessary new keyword.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
dart2_constant ^1.0.0 1.0.2+dart2
Dev dependencies
pedantic ^1.0.0