Consultor Eletrônico



Kbase P13225: Can RETURN error condition be used from a user defined funct
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/01/2003
Status: Unverified

GOAL:

Can an error be raised from a user defined function ( UDF )?

FIX:

Return ERROR cannot be used on User Defined Functions, the following is the documentation on the statement which describes that Return Error can just be used only in a procedure or a Database trigger block.


Return STATEMENT:

RETURN
[ ERROR | NO-APPLY ]
[ return-value ]
ERROR

Causes an ERROR condition in the calling block. This causes the ERROR condition to be raised for the RUN statement in the calling procedure. You can use the ERROR option only in a procedure or a database trigger block. Any values that are set for OUTPUT or INPUT-OUTPUT parameters before the RETURN ERROR executes are not returned to the calling procedure.