Skip to main content

erException

erException = 20

Example

function IsGeneralHostException(const ErrorType: TIFException): Boolean;
begin
Result := ErrorType = erException;
end;

Usage

erException represents a caught Velox host exception that has no more specific Velox scripting runtime mapping.

Formatting and exception state

ExceptionToString returns Exception: followed by Param. It does not apply the control-character filtering used by erCannotImport. An explicit RaiseException(erException, Text) supplies only a category and parameter, not a Velox exception object.

Additional Technical Info

erException is member ordinal 20 of TIFException, the script-visible declaration that is kept in exact ordinal alignment with PascalScript's runtime TPSError. Its sidebar position 22 is alphabetical navigation metadata and is not its enumeration value.

erException is the PascalScript runtime's fallback for a caught Delphi Exception object that was not already classified as EPSException, EDivByZero, EZeroDivide or another EMathError. Imported functions, conversions and external procedure dispatch can therefore map many unrelated host failures to this single category. For a Delphi Exception, the runtime saves Exception.Message as ExceptionParam and retains the acquired exception object. If an acquired raised object is not an Exception descendant, the category is still used but the saved parameter is empty. At the outer host boundary, RaiseCurrentException can re-raise the retained native object; script code cannot inspect its Delphi class.

Behavior, recovery and quirks

  • Different failures can share this category. Diagnose with the parameter, procedure/position, surrounding operation and Velox logs rather than branching on erException alone.
  • The saved Velox message can contain external-system or data values. Review it before exposing it outside the approved support/logging boundary.
  • Host-side retention/re-raise does not make the exception recoverable in script and does not roll back work completed by the failed imported call.
  • Exception transfer is not a database, dataset, filesystem or external-system transaction. Any earlier side effect remains unless the called API or surrounding Flow provides an explicit rollback contract.
  • Do not persist the numeric ordinal as an integration contract. Store the member name, formatted message, parameter and relevant procedure/position with the Velox version.

Related Code Library entries

External references

Created 2026-07-15