MSIR.0975: Difference between revisions
Jump to navigation
Jump to search
m (add link) |
No edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:MSIR.0975 skeleton}} | {{Template:MSIR.0975 skeleton}} | ||
<!--Test SOUL.DNC.004.QA in QASHR exercises at least some MSIR.0975 cases. PDS-6626 --> | |||
<p> | <p> | ||
A <var>[[Exceptions#Try and Catch|Catch]]</var> statement or block was coded in an invalid context. | A <var>[[Exceptions#Try and Catch|Catch]]</var> statement or block was coded in an invalid context. The following examples are among the texts that might be displayed with this message: | ||
</p> | </p> | ||
<p class="code>MSIR.0975: CATCH invalid -- not inside a Try block | <ul> | ||
</p> | <li>The <var>Catch</var> statement or block is not located within a valid <var>Try</var> block, as it must be, in which case the following message is produced: | ||
<p class="code>MSIR.0975: CATCH invalid -- not inside a Try block </p></li> | |||
<li>A <var>Catch</var> statement specifies a base class followed by its extension class, which is not allowed. The <var>Catch</var> statement can specify a base class, an extension class, or an extension followed by the base class being extended, but it must not specify a base followed by an extension. In this latter case, the following message is produced: | |||
<p class="code>MSIR.0975: CATCH invalid -- extension class after base class </p></li> | |||
<li>The only valid syntactical words that can follow an exception class name on a <var>Catch</var> statement are <var>To</var> (to specify the object to which a caught exception is being saved) and <var>And</var> (to introduce an additional exception class to catch). Any other words are rejected with the following message: | |||
<p class="code>MSIR.0975: CATCH invalid -- invalid word after class name </p></li> | |||
<li>The <var>Catch</var> statement specifies a <var>To</var> clause to save the exception to an object, but the object variable name is missing. In this case the following message is produced: | |||
<p class="code>MSIR.0975: CATCH invalid -- target object variable missing</p></li> | |||
</ul> | |||
{{Template:MSIR.0975 footer}} | {{Template:MSIR.0975 footer}} |
Latest revision as of 15:26, 20 June 2018
MSIR.0975 CATCH invalid -- token
A Catch statement or block was coded in an invalid context. The following examples are among the texts that might be displayed with this message:
- The Catch statement or block is not located within a valid Try block, as it must be, in which case the following message is produced:
MSIR.0975: CATCH invalid -- not inside a Try block
- A Catch statement specifies a base class followed by its extension class, which is not allowed. The Catch statement can specify a base class, an extension class, or an extension followed by the base class being extended, but it must not specify a base followed by an extension. In this latter case, the following message is produced:
MSIR.0975: CATCH invalid -- extension class after base class
- The only valid syntactical words that can follow an exception class name on a Catch statement are To (to specify the object to which a caught exception is being saved) and And (to introduce an additional exception class to catch). Any other words are rejected with the following message:
MSIR.0975: CATCH invalid -- invalid word after class name
- The Catch statement specifies a To clause to save the exception to an object, but the object variable name is missing. In this case the following message is produced:
MSIR.0975: CATCH invalid -- target object variable missing
Message attributes:
RETCODEO=0 | Sets online return code |
---|---|
RETCODEB=4 | Sets batch (single user) return code |
CLASS=E | Error class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter |
AUDITER | Writes the message with line type ER to the audit trail |
COUNT | Increments the error count (ERCNT) parameter |
ECHO | Displays the line that caused the error |