Exception classes
So that you don’t have to catch hundreds of individual exceptions, the exception classes related to Synergy/DE runtime errors are organized in a hierarchy that groups common exceptions and like items together. You can use the classes in the hierarchy like this:
proc try open(1, i, 'LOC:myfile.tst') catch (e, @Synergex.SynergyDE.NoFileFoundException) writes(15, "File not found") catch (e, @Synergex.Synergyde.FileIoException) writes(15, "Other file open error - Error "+%string(e.errno)) catch (e) writes(15, "Other system exception") endtry
When catching the exception, you can determine the underlying Synergy/DE error number with the Errno field of the exception variable. For example,
catch (e, Synergex.SynergyDE.BadDigitException) writes(15, %string(e.Errno))
Synergy exception class hierarchy
The following exception class hierarchy is supported. Each indented class is derived from its parent (the lesser indented or bolded) class. See Synergy exception class error mapping for a list of errors that map to each exception class.
All exception classes are derived from System.Exception.
System.SystemException
System.ArgumentException
System.ArgumentNullException
System.ArgumentOutOfRangeException
System.ArithmeticException
System.DivideByZeroException
System.OverflowException
System.OutOfMemoryException
System.InvalidCastException
System.IndexOutOfRangeException
System.MemberAccessException
System.FieldAccessException
System.MethodAccessException
System.MissingMemberException
System.MissingFieldException
System.MissingMethodException
System.InvalidOperationException
System.NullReferenceException
System.ApplicationException
Synergex.SynergyDE.SynException
Synergex.SynergyDE.AXException
Synergex.SynergyDE.BadDigitException
Synergex.SynergyDE.InterruptException
Synergex.SynergyDE.ObjectException
Synergex.SynergyDE.RoutineNotFound
Synergex.SynergyDE.SQLException
Synergex.SynergyDE.SynArgumentException
Synergex.SynergyDE.SynDataException
Synergex.SynergyDE.SynIOException
Synergex.SynergyDE.DeviceNotReadyException
Synergex.SynergyDE.DeviceInUseException
Synergex.SynergyDE.FileIOException
Synergex.SynergyDE.DeletedRecordException
Synergex.SynergyDE.DuplicateException
Synergex.SynergyDE.EndOfFileException
Synergex.SynergyDE.FileCorruptedException
Synergex.SynergyDE.FileFullException
Synergex.SynergyDE.FileInUseException
Synergex.SynergyDE.FileNameException
Synergex.SynergyDE.FileReplaceException
Synergex.SynergyDE.IllegalRecordNumberException
Synergex.SynergyDE.KeyNotSameException
Synergex.SynergyDE.NoCurrentRecordException
Synergex.SynergyDE.NoFileFoundException
Synergex.SynergyDE.NoSpaceException
Synergex.SynergyDE.ProtectionViolationException
Synergex.SynergyDE.RecordLockedException
Synergex.SynergyDE.RecordNotFoundException
Synergex.SynergyDE.RecordNotSameException
Synergex.SynergyDE.RecordTooBigException
Synergex.SynergyDE.OperationTimeoutException
Synergex.SynergyDE.SynServerException
Synergex.SynergyDE.NetworkException
Synergex.SynergyDE.NoConnectionException
Synergex.SynergyDE.ServerNotRunningException
Synergex.SynergyDE.UnknownHostException
Synergex.SynergyDE.UsernameException
Synergex.SynergyDE.WNDException
Synergy exception class error mapping
Synergy/DE maps the following errors to the exception classes listed below.
Synergex.SynergyDE.AXException
Synergex.SynergyDE.BadDigitException
Synergex.SynergyDE.DeletedRecordException
Synergex.SynergyDE.DeviceInUseException
Synergex.SynergyDE.DeviceNotReadyException
Synergex.SynergyDE.DuplicateException
Synergex.SynergyDE.EndOfFileException
Synergex.SynergyDE.FileFullException
Synergex.SynergyDE.FileInUseException
Synergex.SynergyDE.FileIOException
Synergex.SynergyDE.FileNameException
Synergex.SynergyDE.FileReplaceException
Synergex.SynergyDE.IllegalRecordNumberException
Synergex.SynergyDE.InterruptException
Synergex.SynergyDE.IOHookException
Synergex.SynergyDE.KeyNotSameException
Synergex.SynergyDE.NetworkException
Synergex.SynergyDE.NoCurrentRecordException
Synergex.SynergyDE.NoConnectionException
Synergex.SynergyDE.NoFileFoundException
Synergex.SynergyDE.NoSpaceException
Synergex.SynergyDE.ObjectException
Synergex.SynergyDE.OperationTimeoutException
Synergex.SynergyDE.ProtectionViolationException
Synergex.SynergyDE.RecordNotFoundException
Synergex.SynergyDE.RecordLockedException
Synergex.SynergyDE.RecordNotSameException
Synergex.SynergyDE.RecordTooBigException
Synergex.SynergyDE.RoutineNotFound
Synergex.SynergyDE.ServerNotRunningException
Synergex.SynergyDE.SQLException
Synergex.SynergyDE.SynArgumentException
Synergex.SynergyDE.SynDataException
Synergex.SynergyDE.SynException
Synergex.SynergyDE.SynIOException
Synergex.SynergyDE.SynServerException
Synergex.SynergyDE.UnknownHostException
Synergex.SynergyDE.UsernameException
Synergex.SynergyDE.WNDException
System.ArgumentNullException
System.IndexOutOfRangeException
System.DivideByZeroException
System.OutOfMemoryException
System.OverflowException
System.InvalidCastException
System.MissingFieldException
System.MissingMethodException
System.InvalidOperationException
System.NullReferenceException