erOutOfProcRange
erOutOfProcRange = 9
Example
function IsInvalidProcedureIndex(const ErrorType: TIFException): Boolean;
begin
Result := ErrorType = erOutOfProcRange;
end;
Usage
erOutOfProcRange indicates that Velox scripting attempted to invoke a procedure number outside the loaded procedure table.
Formatting and exception state
ExceptionToString ignores Param and returns Out of Proc Range. The invalid procedure number and table size are not placed in the parameter.
Additional Technical Info
erOutOfProcRange is member ordinal 9 of TIFException, the script-visible declaration that is kept in exact ordinal alignment with PascalScript's runtime TPSError. Its sidebar position 36 is alphabetical navigation metadata and is not its enumeration value.
erOutOfProcRange is emitted when RunProc receives a procedure number greater than or equal to FProcs.Count and when bytecode call paths decode an invalid target index. The target cannot be resolved to either an internal or external procedure record.
This differs from erCouldNotCallProc: that category has a valid/resolved target whose adapter fails, whereas erOutOfProcRange has no procedure record at the requested numeric slot.
Behavior, recovery and quirks
- The number is compiled VM metadata, not a public stable identifier and not the Code Library sidebar position.
- Corrupt/incompatible bytecode, stale exported-procedure references or incorrect host use of numeric
RunProcAPIs are primary causes. - Retain the call context and artifact; recompilation is safer than attempting to substitute another index.
- 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
TIFException- complete member order and shared VM-error contract.ExceptionType- read the category saved for the current executor/handler.ExceptionParam- read its associated parameter before state changes.ExceptionProcandExceptionPos- locate the compiled procedure and instruction.ExceptionToString- exact text/parameter mapping for every category.RaiseExceptionandRaiseLastException- create a new error or preserve the caught one.try..except- handler availability, propagation and rollback boundaries.
External references
- RemObjects PascalScript
uPSRuntime.pas- upstream runtime taxonomy and executor context; the modified source shipped with Velox is authoritative for current behavior.