ElginException class

Exceção personalizada para operações com dispositivos Elgin.

Esta exceção é lançada sempre que ocorre um erro durante as operações com impressoras ou outros dispositivos Elgin. Ao ser criada, ela instancia internamente um ElginError com o código informado, permitindo acessar o tipo e a mensagem descritiva do erro.

Exemplo de uso:

try {
  await Elgin.printer.connect(driver: config);
} on ElginException catch (e) {
  print('Erro: ${e.error.type} - ${e.error.message}');
}
Implemented types

Constructors

ElginException.new(int exception)
Cria uma nova exceção ElginException com o exception informado.

Properties

error ElginError
Instância de ElginError correspondente ao código do erro.
latefinal
exception int
Código do erro retornado pela operação.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited