TopCon API  1.1.0
.Net API to control TopCon devices
CH.Regatron.HPPS.ExceptionMessenger Class Reference

More...

Inheritance diagram for CH.Regatron.HPPS.ExceptionMessenger:
Inheritance graph

Public Member Functions

 ExceptionMessenger ()
 
void ThrowException (Exception exception)
 Write the exception message and throw the exception. More...
 
void ThrowException (String message)
 Write the message and throw the exception. More...
 
void ThrowSimulationException (string message, BatterySimulationState actualSimulationState, BatterySimulationState desiredSimulationState)
 This exception is thrown by calling not allowed operations for an state. Example: Current state is Started and the ResumeSimulation() function is called!

Parameters
messageException message
actualSimulationStateActual simulation state.
desiredSimulationStateTarget simulation state.
More...
 
string GetLastError ()
 Get the last exception message. More...
 
void Dispose ()
 
void DoDispose (bool calledByFinalizer)
 

Public Attributes

bool Disposed => _disposed
 

Detailed Description

Constructor & Destructor Documentation

◆ ExceptionMessenger()

CH.Regatron.HPPS.ExceptionMessenger.ExceptionMessenger ( )

Member Function Documentation

◆ Dispose()

void CH.Regatron.HPPS.ExceptionMessenger.Dispose ( )

◆ DoDispose()

void CH.Regatron.HPPS.ExceptionMessenger.DoDispose ( bool  calledByFinalizer)

Parameters
calledByFinalizer

◆ GetLastError()

string CH.Regatron.HPPS.ExceptionMessenger.GetLastError ( )

Get the last exception message.

Returns

Implements CH.Regatron.HPPS.IExceptionMessenger.

◆ ThrowException() [1/2]

void CH.Regatron.HPPS.ExceptionMessenger.ThrowException ( Exception  exception)

Write the exception message and throw the exception.

Parameters
exception

◆ ThrowException() [2/2]

void CH.Regatron.HPPS.ExceptionMessenger.ThrowException ( String  message)

Write the message and throw the exception.

Parameters
message

◆ ThrowSimulationException()

void CH.Regatron.HPPS.ExceptionMessenger.ThrowSimulationException ( string  message,
BatterySimulationState  actualSimulationState,
BatterySimulationState  desiredSimulationState 
)

This exception is thrown by calling not allowed operations for an state. Example: Current state is Started and the ResumeSimulation() function is called!

Parameters
messageException message
actualSimulationStateActual simulation state.
desiredSimulationStateTarget simulation state.

Member Data Documentation

◆ Disposed

bool CH.Regatron.HPPS.ExceptionMessenger.Disposed => _disposed