Exceptions and asserts

Survey Core does not generally use exception handling.  Problems are dealt with either by passing back error or status codes from functions, or in serious cases by terminating the SC process using the C runtime Assert mechanism.  This provides some limited information in the form of an assert dialog, however more information is generally contained in the Survey Core log file (...\Trimble Data\System files\sc.log).

Where the problem can be related to a plugin, lines similar to those shown below will be written in the log.  Within the more generic parts of SC where it is unknown which plugin, if any, initiated the problem, no such information is available. 

09:1477551.176 *** FATAL error: An exception has occurred in SCAPI during a call from Plugin: [SC test plugin] 

09:1477551.176 *** The interface raising the exception was: [isc_Control] 

09:1477551.176 *** The plugin object: [0x469d1d0 = (ToString() not implemented)] 

09:1477551.176 *** MESSAGE: A tsc_PointField requres a current job to be open. 

In the above, the log gives the name of the plugin (SC test plugin), and the interface that was called (isc_Control).  The interface name will usually relate to a similarly-named API class which in this case is tsc_Control (or some subclass of it).

The address of any associated object in the plugin is given (0x469d1d0) and the output of its ToString method, if it is implemented (in this case it is not).

Finally, a specific message explaining the problem is given (A tsc_PointField requres a current job to be open).

The numbers at the start of each line (09:1477551.176) give a thread identifier and the linear time (seconds since startup).