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

$ERR_AXERR

$ERR_AXNOFIND

$ERR_AXNOLOAD

$ERR_AXNOSUB

$ERR_AXUNSUP

Synergex.SynergyDE.BadDigitException

$ERR_DIGIT

Synergex.SynergyDE.DeletedRecordException

$ERR_DELREC

Synergex.SynergyDE.DeviceInUseException

$ERR_DEVUSE

Synergex.SynergyDE.DeviceNotReadyException

$ERR_DEVNOTRDY

Synergex.SynergyDE.DuplicateException

$ERR_NODUPS

Synergex.SynergyDE.EndOfFileException

$ERR_EOF

Synergex.SynergyDE.FileFullException

$ERR_FILFUL

$ERR_RECLIMIT

$ERR_SIZLIMIT

Synergex.SynergyDE.FileInUseException

$ERR_FINUSE

Synergex.SynergyDE.FileIOException

$ERR_DEADLOCK

$ERR_FILOPT

$ERR_FILORG

$ERR_INVALRFA

$ERR_IRCSIZ

$ERR_SDMSERR

$ERR_INTISM

$ERR_INVKVAL

$ERR_INVPKEY

$ERR_NOTISM

$ERR_OPNERR

$ERR_RECLNG

$ERR_RELREC

$ERR_RMSERROR

Synergex.SynergyDE.FileNameException

$ERR_FILSPC

Synergex.SynergyDE.FileReplaceException

$ERR_REPLAC

Synergex.SynergyDE.IllegalRecordNumberException

$ERR_RECNUM

Synergex.SynergyDE.InterruptException

$ERR_INTRPT

Synergex.SynergyDE.IOHookException

$ERR_HKNOTIMP

$ERR_HKNOOPS

$ERR_HKNOTACT

$ERR_HKNOTIMP

Synergex.SynergyDE.KeyNotSameException

$ERR_KEYNOT

Synergex.SynergyDE.NetworkException

$ERR_NETCRYPT

$ERR_NETPROB

Synergex.SynergyDE.NoCurrentRecordException

$ERR_NOCURR

Synergex.SynergyDE.NoConnectionException

$ERR_XFNOCONN

Synergex.SynergyDE.NoFileFoundException

$ERR_FNF

Synergex.SynergyDE.NoSpaceException

$ERR_NOSPAC

Synergex.SynergyDE.ObjectException

$ERR_CLSMTCH

$ERR_INCPTCLS

$ERR_INVCLSHND

$ERR_INVNETHND

$ERR_INVNAMHND

$ERR_NOOBJ

$ERR_NOTCLSHND

$ERR_NOTNAMHND

$ERR_NOTNETHND

$ERR_NOTOBJID

$ERR_NOTOHND

$ERR_OHNDREQ

Synergex.SynergyDE.OperationTimeoutException

$ERR_TIMOUT

Synergex.SynergyDE.ProtectionViolationException

$ERR_PROTEC

Synergex.SynergyDE.RecordNotFoundException

$ERR_RNF

Synergex.SynergyDE.RecordLockedException

$ERR_LOCKED

Synergex.SynergyDE.RecordNotSameException

$ERR_RECNOT

Synergex.SynergyDE.RecordTooBigException

$ERR_TOOBIG

Synergex.SynergyDE.RoutineNotFound

$ERR_FNOTFOUND

$ERR_NOMETHOD

$ERR_RTNNF

Synergex.SynergyDE.ServerNotRunningException

$ERR_NOSERVER

Synergex.SynergyDE.SQLException

$ERR_BADDATATYP

$ERR_CURSERR

$ERR_NOMORECURS

$ERR_NOSQL

$ERR_SQLDYN

$ERR_SQLERR

$ERR_SQLSTACK

Synergex.SynergyDE.SynArgumentException

$ERR_ALPHARG

$ERR_AORDXP

$ERR_AORIARG

$ERR_ARGDIG

$ERR_ARGMIS

$ERR_ARGORD

$ERR_ARGREC

$ERR_ARGSIZ

$ERR_BDIGXP

$ERR_HDIGXP

$ERR_IDXP

$ERR_INTARG

$ERR_INVARG

$ERR_NUMXP

$ERR_OPTINV

$ERR_WROARG

$ERR_WRTLIT

Synergex.SynergyDE.SynDataException

$ERR_ADDRSIZ

$ERR_ARGDIGPT

$ERR_DATACRYPT

$ERR_HSIZERR

$ERR_INVDSCR

$ERR_INVDIM

$ERR_INVEXFTYP

$ERR_INVHDL

$ERR_INVPRC

$ERR_IORDXP

$ERR_IRNDVAL

$ERR_ODIGXP

$ERR_RNDVAL

$ERR_SALTIV

$ERR_SETTYP

$ERR_SUBSCR

Synergex.SynergyDE.SynException

$ERR_BADADDR

$ERR_BADDBGPORT

$ERR_BADDBGTMOT

$ERR_BADFORMAT

$ERR_BADHANDLE

$ERR_BIGALPHA

$ERR_BITOPP

$ERR_DBGCLOSED

$ERR_DBGNOCONN

$ERR_DBGNOSOCK

$ERR_DBGSOCKER

$ERR_DLLCLSERR

$ERR_DLLOPNERR

$ERR_DLLOPNMOD

$ERR_GBLNF

$ERR_INVACT

$ERR_INVCLLSEQ

$ERR_INVDATE

$ERR_INVFORENT

$ERR_INVPNHAND

$ERR_INVRCBHND

$ERR_INVRPTHND

$ERR_LIBMAX

$ERR_MAXPRC

$ERR_MSGNOTFND

$ERR_NDNOPP

$ERR_NOCALL

$ERR_NODBGPORT

$ERR_NODBLOPT

$ERR_NOFORK

$ERR_NOTPNHAND

$ERR_NOTRCBHND

$ERR_NOTRPTHND

$ERR_NOXCAL

$ERR_PURGE

$ERR_RCBCALL

$ERR_RCBDYN

$ERR_RCBOBJ

$ERR_RCBSTACK

$ERR_RECEXTCAL

$ERR_UNDEFERR

$ERR_UNSUP

$ERR_WNFNCERR

$ERR_WINRSRC

Synergex.SynergyDE.SynIOException

$ERR_BACKPEND

$ERR_BADKEY

$ERR_BADXDLF

$ERR_BADXDLS

$ERR_BLKSIZ

$ERR_CHNEXC

$ERR_CHNUSE

$ERR_EXQUOTA

$ERR_ILLCHN

$ERR_IOFAIL

$ERR_IOMODE

$ERR_LPQERR

$ERR_MAXIF

$ERR_MRGERR

$ERR_MSGFAIL

$ERR_NOFDL

$ERR_NOOPEN

$ERR_NOTAVL

$ERR_ONLYWR

$ERR_OUTRDO

$ERR_QUEUENOTAV

$ERR_SMERR

$ERR_SRTFAI

$ERR_SYNSOCK

$ERR_UPDNFD

$ERR_WRONGTHREAD

Synergex.SynergyDE.SynServerException

$ERR_CLNTERR

$ERR_NETCONFIG

$ERR_SRVLICERR

$ERR_SRVLICTIMO

$ERR_SRVRLICNS

$ERR_SRVNOTSUP

$ERR_XFBADARRAY

$ERR_XFBADMTHID

$ERR_XFBADPKTID

$ERR_XFBADPKT

$ERR_XFBADTYPE

$ERR_XFHALT

$ERR_XFINCALL

$ERR_XFIOERR

$ERR_XFMETHCRYPT

$ERR_XFMETHKNF

$ERR_XFNOCALL

$ERR_XFNOCDT

$ERR_XFNOCMPDT

$ERR_XFNOELB

$ERR_XFNOINIT

$ERR_XFNUMPARMS

$ERR_XFREQPARM

$ERR_XFRTNNF

$ERR_XFSERVNOSEC

$ERR_XFUNKERR

Synergex.SynergyDE.UnknownHostException

$ERR_BADHOST

Synergex.SynergyDE.UsernameException

$ERR_BADUSER

Synergex.SynergyDE.WNDException

$ERR_BADFONTID

$ERR_BADFONTNAM

$ERR_BADWNDID

$ERR_DUPFONTNAM

$ERR_INVWNDHND

$ERR_NOTWNDHND

$ERR_WNDERR

System.ArgumentNullException

$ERR_NULARG

System.IndexOutOfRangeException

$ERR_OUTRNG

System.DivideByZeroException

$ERR_DIVIDE

System.OutOfMemoryException

$ERR_NOMEM

System.OverflowException

$ERR_BIGNUM

System.InvalidCastException

$ERR_INVCAST

System.MissingFieldException

$ERR_MISSFLD

System.MissingMethodException

$ERR_MISSMETH

System.InvalidOperationException

$ERR_INVOPER

System.NullReferenceException

$ERR_NULLREF