laravel_exception 0.0.4 copy "laravel_exception: ^0.0.4" to clipboard
laravel_exception: ^0.0.4 copied to clipboard

parse laravel exceptions to dart classes for easier and better handling support 422 - validation ,500 server errors , 404 not found exceptions

example/main.dart

import 'package:laravel_exception/laravel_exception.dart';

void main(List<String> args) {
  dynamic res;
  if (res.statusCode == 422) {
    throw LValidationException(res.data);
  } else if (res.statusCode == 500) {
    throw LServerException.parse(res.data);
  } else if (res.statusCode == 404) {
    throw LNotFoundException.parse(res.data);
  }
}
9
likes
140
pub points
72%
popularity

Publisher

verified publishermaxzod.com

parse laravel exceptions to dart classes for easier and better handling support 422 - validation ,500 server errors , 404 not found exceptions

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

equatable

More

Packages that depend on laravel_exception