• Description:
    RAISE keyword allows You to predefine exception and exceptioninfo variables that will be set when given function will return given variable with given condition.

  • Syntax:
      RAISE <exc> [ ,<exci> ] IF <func>()<cond><value>
    

    where: <exc> and <exci> are values contained in exception and exceptioninfo variables. <func> is given function name. <cond> is one of: =, <, >, =<, => or <>. <value> is value returned by <func>. If <value><cond>itioned with returned function value is true, exception will be proceeded.

  • Example:
      RAISE "FILE" IF Open()=NIL,
            "MEM"  IF AllocVec()=NIL
    
      f:=Open('ram:file',OLDFILE)
      m:=AllocVec(256,0)
    

    is the same as:
      IF (f:=Open('ram:file',OLDFILE))=NIL THEN Raise("FILE")
      IF (m:=AllocVec(256,0))=NIL THEN Raise("MEM")