erCouldNotCallProc
erCouldNotCallProc = 17
Example
function IsProcedureDispatchFailure(const ErrorType: TIFException): Boolean;
begin
Result := ErrorType = erCouldNotCallProc;
end;
Usage
erCouldNotCallProc indicates that a resolved Velox scripting procedure target could not be invoked successfully.
Formatting and exception state
ExceptionToString returns Could not call proc. When Param is non-empty it appends ( + Param + ). Current automatic producer sites normally supply no parameter; a parenthesised detail is most likely to come from an explicit RaiseException call or another host integration.
Additional Technical Info
erCouldNotCallProc is member ordinal 17 of TIFException, the script-visible declaration that is kept in exact ordinal alignment with PascalScript's runtime TPSError. Its sidebar position 19 is alphabetical navigation metadata and is not its enumeration value.
erCouldNotCallProc means that the VM found a procedure target but the runtime adapter could not complete the call. This is later than erCannotImport: the procedure record exists and was resolved, but invocation failed.
The main external-call paths emit it when a registered procedure returns False without first setting a more specific executor error. Class/interface dispatch helpers also emit it when their method adapter cannot make the requested call. If the adapter already set another TPSError, the VM preserves that category instead of overwriting it with this generic one.
Behavior, recovery and quirks
- A valid procedure index is not proof that the Velox adapter can call it with the current object, interface, arguments and runtime state.
- The failed adapter may have changed objects, datasets, files or other host state before returning
False. VM exception transfer provides no automatic rollback. - Use the original category/parameter and call position when diagnosing. Replacing it with
erCustomErrorremoves the distinction between dispatch failure and deliberate business validation. - 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.