class ServerException implements Exception {
  final String message;

  ServerException([this.message = 'Une erreur serveur est survenue']);

  @override
  String toString() => 'ServerException: $message';
}

class CacheException implements Exception {}

class AuthenticationException implements Exception {
  final String message;

  AuthenticationException(this.message);

  @override
  String toString() => 'AuthenticationException: $message';
}

class ServerExceptionWithMessage implements Exception {
  final String message;

  ServerExceptionWithMessage(this.message);

  @override
  String toString() => 'ServerException: $message';
}

class UserNotFoundException implements Exception {
  final String message;
  UserNotFoundException([this.message = "User not found"]);

  @override
  String toString() => "UserNotFoundException: $message";
}

class ConflictException implements Exception {
  final String message;
  ConflictException([this.message = "Conflict"]);

  @override
  String toString() => "ConflictException: $message";
}

class UnauthorizedException implements Exception {
  final String message;
  UnauthorizedException([this.message = "Unauthorized"]);

  @override
  String toString() => "UnauthorizedException: $message";
}