Event API
tvscript_add_event_handler event event_handler
Registers a procedure handler to call when the named event occurs. The event is either error or actionpoint.
When tvscript calls an event handler procedure, it passes one argument to it. This argument contains a list that you must convert into an array.
error
When any error occurs, the array has the following indices:
event—The event, which is set to error
process_id— The ID of the process that hit the action point
thread_id—The ID of the thread that hit the action point
error_message—A message describing the error that occurred
actionpoint
When any action point is hit, the array has the following indices:
event—The event, which is set to actionpoint
process_id—The ID of the process that hit the action point
thread_id—The ID of the thread that hit the action point
actionpoint_id—The ID of the action point that was hit
actionpoint_source_loc_expr—The initial source location expression used to create the action point