Subroutine Name | Executable Example | Viewable Example |
---|---|---|
W3ERROR |
E3ERROR |
E3ERROR |
Errors generated by the Natural runtime should be handled to avoid
screen output. Therefore, an ON ERROR
section must be added to all
programs called with the Natural Web Interface. The PDA W3CONST
must be added as well.
The subroutine W3ERROR-TEMPLATE
is called if an error
occurs. This routine can be changed for your own needs.
The subroutine W3ERROR-TEMPLATE-XML
returns the error
page as XHTML page. This routine can be changed for your own needs. To activate
this template, uncatalog W3ERROR-TEMPLATE
and rename the
subroutine from W3ERROR-TEMPLATE-XML
to
W3ERROR-TEMPLATE
and stow.
The subroutine W3ERROR-TEXT
is for internal use
only.
1 ##W3ERROR 2 NR (I4) /* i /m : Number of the error 2 LINE (I4) /* i /m : Line in the Natural program 2 SUBPROGRAM (A008) /* i /m : Subprogram name 2 SUBROUTINE (A032) /* i /m : Subroutine name 2 TEXT (A250) /* i /m : Error text
ON ERROR PERFORM W3ERROR ##W3ERROR PERFORM W3END ##RPC ESCAPE ROUTINE END-ERROR