MSIR.1052: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Change all occurrences of RETHROW to Rethrow) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Template:MSIR.1052 skeleton}} | {{Template:MSIR.1052 skeleton}} | ||
<!--Test SOUL.DNC.030.QA in QASHR exercises at least some MSIR.1052 cases. PDS-6626 --> | |||
<p> | <p> | ||
A Rethrow statement has been coded incorrectly.Variants of the message include the following: | A Rethrow statement has been coded incorrectly.Variants of the message include the following: | ||
Line 5: | Line 6: | ||
<ul> | <ul> | ||
<li>A rethrow statement must appear within a Try block, otherwise the following message is produced | <li>A rethrow statement must appear within a Try block, otherwise the following message is produced | ||
<p class="code>MSIR.1052: | <p class="code>MSIR.1052: Rethrow invalid -- not inside a Try block</p> | ||
</li> | </li> | ||
<li>In addition to appearing within a Try block, the Rethrow statement must appear within a method, otherwise the folloiwng message is produced | <li>In addition to appearing within a Try block, the Rethrow statement must appear within a method, otherwise the folloiwng message is produced | ||
<p class="code>MSIR.1052: | <p class="code>MSIR.1052: Rethrow invalid -- not in a method</p> | ||
</li> | </li> | ||
<li>The method definition that includes the Rethrow statement must include a Throws clause, specifying the type of exception class being thrown, otherwise the following message is produced | |||
<p class="code>MSIR.1052: Rethrow invalid -- method definition has no Throws clause</p> | |||
</li> | |||
<li>The target object of a Rethrow statement must be of a class specified on the Throws clause of the owning method definition, otherwise the following message is produced | |||
<p class="code>MSIR.1052: Rethrow invalid -- object not of a thrown class</p> | |||
</li> | |||
<li>A Rethrow statement cannot specify an object of a class that has previously been caught with a Catch statement, otherwise the following message is produced | |||
<p class="code>MSIR.1052: Rethrow invalid -- duplicate class</p> | |||
</li> | |||
<li>The object being Rethrown must be of an exception class, otherwise the following message is produced | |||
<p class="code>MSIR.1052: Rethrow invalid -- not an exception class</p> | |||
</li> | |||
</ul> | </ul> | ||
<p> | <p> |
Latest revision as of 18:48, 25 March 2020
MSIR.1052 RETHROW invalid -- token
A Rethrow statement has been coded incorrectly.Variants of the message include the following:
- A rethrow statement must appear within a Try block, otherwise the following message is produced
MSIR.1052: Rethrow invalid -- not inside a Try block
- In addition to appearing within a Try block, the Rethrow statement must appear within a method, otherwise the folloiwng message is produced
MSIR.1052: Rethrow invalid -- not in a method
- The method definition that includes the Rethrow statement must include a Throws clause, specifying the type of exception class being thrown, otherwise the following message is produced
MSIR.1052: Rethrow invalid -- method definition has no Throws clause
- The target object of a Rethrow statement must be of a class specified on the Throws clause of the owning method definition, otherwise the following message is produced
MSIR.1052: Rethrow invalid -- object not of a thrown class
- A Rethrow statement cannot specify an object of a class that has previously been caught with a Catch statement, otherwise the following message is produced
MSIR.1052: Rethrow invalid -- duplicate class
- The object being Rethrown must be of an exception class, otherwise the following message is produced
MSIR.1052: Rethrow invalid -- not an exception class
Response:
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 |