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.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

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.

$ERR_AXERR

$ERR_AXNOFIND

$ERR_AXNOLOAD

$ERR_AXNOSUB

$ERR_AXUNSUP

$ERR_DIGIT

$ERR_DELREC

$ERR_DEVUSE

$ERR_DEVNOTRDY

$ERR_NODUPS

$ERR_EOF

$ERR_FILFUL

$ERR_RECLIMIT

$ERR_SIZLIMIT

$ERR_FINUSE

$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

$ERR_FILSPC

$ERR_REPLAC

$ERR_RECNUM

$ERR_INTRPT

$ERR_HKNOTIMP

$ERR_HKNOOPS

$ERR_HKNOTACT

$ERR_HKNOTIMP

$ERR_KEYNOT

$ERR_NETCRYPT

$ERR_NETPROB

$ERR_NOCURR

$ERR_XFNOCONN

$ERR_FNF

$ERR_NOSPAC

$ERR_CLSMTCH

$ERR_INCPTCLS

$ERR_INVCLSHND

$ERR_INVNETHND

$ERR_INVNAMHND

$ERR_NOOBJ

$ERR_NOTCLSHND

$ERR_NOTNAMHND

$ERR_NOTNETHND

$ERR_NOTOBJID

$ERR_NOTOHND

$ERR_OHNDREQ

$ERR_TIMOUT

$ERR_PROTEC

$ERR_RNF

$ERR_LOCKED

$ERR_RECNOT

$ERR_TOOBIG

$ERR_FNOTFOUND

$ERR_NOMETHOD

$ERR_RTNNF

$ERR_NOSERVER

$ERR_BADDATATYP

$ERR_CURSERR

$ERR_NOMORECURS

$ERR_NOSQL

$ERR_SQLDYN

$ERR_SQLERR

$ERR_SQLSTACK

$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

$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

$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

$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

$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

$ERR_BADHOST

$ERR_BADUSER

$ERR_BADFONTID

$ERR_BADFONTNAM

$ERR_BADWNDID

$ERR_DUPFONTNAM

$ERR_INVWNDHND

$ERR_NOTWNDHND

$ERR_WNDERR

$ERR_NULARG

$ERR_OUTRNG

$ERR_DIVIDE

$ERR_NOMEM

$ERR_BIGNUM

$ERR_INVCAST

$ERR_MISSFLD

$ERR_MISSMETH

$ERR_INVOPER

$ERR_NULLREF