sealed class VpnException implements Exception {
  final String message;
  VpnException(this.message);

  @override
  String toString() => message;
}

class WaitOnlineTimedOutException extends VpnException {
  WaitOnlineTimedOutException() : super('wait service online timedout');
}

class RpcException extends VpnException {
  RpcException(super.message);
}

class VpnInvalidParamsException extends VpnException {
  VpnInvalidParamsException([String? message])
      : super(message ?? 'Invalid connection parameters');
}

class VpnServiceNotOnlineException extends VpnException {
  VpnServiceNotOnlineException() : super('vpn service not online');
}

class VpnServiceNotRunningException extends VpnException {
  VpnServiceNotRunningException() : super('vpn service not running');
}
