Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Exception Handling

  • Last UpdatedJan 07, 2026
  • 1 minute read

The Vitesse UI interface uses exception handling. This means that if a run time error occurs an exception is set. The exception can be caught using the "try - except" construct of the Python language. The type of error can then be examined by checking the value of kcs_ui.error. The exception is also written to the Vitesse log. The meaning of the exception can be found in the documentation of the corresponding function.

The default error is kcs_Error.

Note: The kcs_Error exception is a general exception and will not be further described below.

Example:

import kcs_ui

msg = 'Please give a position'

coord = KcsPoint2D.Point2D()

try:

res = kcs_ui.point2D_req(msg,coord)

except:

print kcs_ui.error

Related Links
TitleResults for “How to create a CRG?”Also Available in