MSIR.0973: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
m (mention QA test for this msg)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:MSIR.0973 skeleton}}
{{Template:MSIR.0973 skeleton}}
<p>
<p>
A Throws clause has been coded in an invalid context. There are a few scenarios where this message might be produced..
A <var>Throws</var> clause was coded in an invalid context. The following examples are amongst the possibles texts that can be displayed with this message:
</p>
</p>
<ul>
<ul>
<li>A method with the special name of either OnThrow or OnUncaught has been coded with the Throws clause, which is not allowed as it would cause a loop in exception handling. This would produce the message
<li>A method with the special name <code>OnThrow</code> or <code>OnUncaught</code> was coded with the <var>Throws</var> clause. This is not allowed, since it causes a loop in exception handling. This condition produces the following message:
<p class="code>MSIR.0973: THROWS invalid -- OnThrow/OnUncaught don't allow THROWS</p>
<p class="code>MSIR.0973: THROWS invalid -- OnThrow/OnUncaught don't allow THROWS</p></li>
<li>a Throws clause has been coded specifying duplicate exceptions classes. This condition produces the message
 
<p class="code>MSIR.0973: THROWS invalid -- duplicate thrown class </p>  
<li>A <var>Throws</var> clause was coded specifying duplicate exception classes. This condition produces the following message:
<li> A Throws clause specifies a class name for a non-exception class. This produces the message
<p class="code>MSIR.0973: THROWS invalid -- duplicate thrown class </p></li>
<p class="code>MSIR.0973: THROWS invalid -- class ''classname'' not an exception class</p>
<li> A Throws clause specifies a base exception class, followed by its extension class name. In this case, either the base class can be specified, or the extension, or the extension followed by the base class, but not base followed by extension. Here the following message is produced
<li>A <var>Throws</var> clause specifies a non-exception class. This produces the following message:
<p class="code>MSIR.0973: THROWS invalid -- base class listed before extension</p>  
<p class="code>MSIR.0973: THROWS invalid -- class <i>classname</i> not an exception class</p></li>
 
<li>A <var>Throws</var> clause specifies a base exception class, followed by an extension of the base class. But this order is not allowed. You may specify the extension followed by the base class, or the base class alone, or the extension class alone, but <i>not</i> base followed by extension.  
The following message is produced:
<p class="code>MSIR.0973: THROWS invalid -- base class listed before extension</p></li>
</ul>  
</ul>  
<p>
<b>Response:</b>
</p>
{{Template:MSIR.0973 footer}}
{{Template:MSIR.0973 footer}}
<!-- SOUL.DNC.002.QA for MSIR.0973 tests -->

Latest revision as of 16:24, 31 May 2018

MSIR.0973  THROWS invalid -- token

A Throws clause was coded in an invalid context. The following examples are amongst the possibles texts that can be displayed with this message:

  • A method with the special name OnThrow or OnUncaught was coded with the Throws clause. This is not allowed, since it causes a loop in exception handling. This condition produces the following message:

    MSIR.0973: THROWS invalid -- OnThrow/OnUncaught don't allow THROWS

  • A Throws clause was coded specifying duplicate exception classes. This condition produces the following message:

    MSIR.0973: THROWS invalid -- duplicate thrown class

  • A Throws clause specifies a non-exception class. This produces the following message:

    MSIR.0973: THROWS invalid -- class classname not an exception class

  • A Throws clause specifies a base exception class, followed by an extension of the base class. But this order is not allowed. You may specify the extension followed by the base class, or the base class alone, or the extension class alone, but not base followed by extension. The following message is produced:

    MSIR.0973: THROWS invalid -- base class listed before extension

Message attributes:

RETCODEO=0Sets online return code
RETCODEB=4Sets batch (single user) return code
CLASS=EError class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter
AUDITERWrites the message with line type ER to the audit trail
COUNTIncrements the error count (ERCNT) parameter
ECHODisplays the line that caused the error

Back to list of messages