ScreenReadError class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ The <var>ScreenReadError</var> exception class describes an exception associated with To produce a <var>ScreenReadError</var> exception for yourself, you typicall...")
 
mNo edit summary
Line 2: Line 2:
The <var>ScreenReadError</var> exception class describes an exception associated with  
The <var>ScreenReadError</var> exception class describes an exception associated with  
   
   
To produce a <var>ScreenReadError</var> exception for yourself, you typically use a <var class="product">SOUL</var> <var>[[Exceptions#Throwing exceptions|Throw]]</var> statement with the <var>[[New (ScreenReadError constructor)|New]]</var> <var>ScreenReadError</var> constructor. For example, the following statement throws a <var>ScreenReadError</var> exception for the value <code>ABCD</code>:
To produce a <var>ScreenReadError</var> exception for yourself, you typically use a <var class="product">SOUL</var> <var>[[Exceptions#Throwing exceptions|Throw]]</var> statement with the <var>[[New (ScreenReadError constructor)|New]]</var> <var>ScreenReadError</var> constructor. For example, the following statement throws a <var>ScreenReadError</var> exception:
<p class="code">throw %(screenReadError):new(Name='abcd')
<p class="code">throw %(screenReadError):new
</p>
</p>
   
   
Line 16: Line 16:
The methods in the class are described in the subsections that follow. In addition:
The methods in the class are described in the subsections that follow. In addition:
<ul>
<ul>
<li>[[Notation conventions for methods|"Notation conventions for methods"]] has information
<li>[[Notation conventions for methods|Notation conventions for methods]] has information
about the conventions followed.  
about the conventions followed.  
<li>[[ScreenReadError methods syntax]] is a single page that contains the syntax diagrams of all the methods in the class.
<li>[[ScreenReadError methods syntax]] is a single page that contains the syntax diagrams of all the methods in the class.
</ul>
</ul>
==Name property==
{{Template:ScreenReadError:Name subtitle}}
This <var>[[Classes and Objects#readWrite|ReadOnly]]</var> property returns a string that contains the name of the statistic that is not recognized by the calling method.
===Syntax===
{{Template:ScreenReadError:Name syntax}}
====Syntax terms====
<table class="syntaxTable">
<tr><th>%string</th>
<td>This string variable is to contain the name of the unrecognized statistic.
</td></tr>
<tr><th>screenReadError</th>
<td>An <var>[[ScreenReadError_class|ScreenReadError]]</var> object variable.
</td></tr></table>


==New constructor==
==New constructor==
{{Template:UnknownStatistic:New subtitle}}
{{Template:ScreenReadError:New subtitle}}


This <var>Constructor</var> generates an instance of an <var>[[ScreenReadError_class|ScreenReadError]]</var> exception.  As shown below, the required argument of the <var>New</var> method is a specific string value that is ''not'' the name of a valid or appropriate <var class="product">Model 204</var> user statistic for the method that is being called.
This <var>Constructor</var> generates an instance of an <var>[[ScreenReadError_class|ScreenReadError]]</var> exception.   


===Syntax===
===Syntax===
Line 51: Line 32:
<table class="syntaxTable">
<table class="syntaxTable">


<tr><th>%unknownStatistic</th>
<tr><th>%screenReadError</th>
<td>An <var>[[ScreenReadError_class|ScreenReadError]]</var> object variable.
<td>An <var>[[ScreenReadError_class|ScreenReadError]]</var> object variable.
</td></tr>
</td></tr>


<tr><th><var>[%(ScreenReadError):]</var></th>
<tr><th><var>[%(ScreenReadError):]</var></th>
<td>The class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>. See [[#Usage notes|"Usage notes"]], below, for more information about invoking an <var>UnknownStatistic</var> <var>Constructor</var>.</td></tr>
<td>The class name in parentheses denotes a <var>[[Notation conventions for methods#Constructors|Constructor]]</var>. See [[#Usage notes|Usage notes]], below, for more information about invoking an <var>ScreenReadError</var> <var>Constructor</var>.</td></tr>
 
</table>
<tr><th><var>Name</var></th>
<td>This [[Methods#Named parameters|name required]] parameter specifies the string value (<var class="term">string</var>) that is the name of the statistic for which you are providing the exception.
</td></tr></table>


===Usage notes===
===Usage notes===
<ul>
<ul>
<li>As described in [[Object variables#Using New or other Constructors|Using New or other Constructors]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%unknown = new(Name='MYSTAT')
<li>As described in [[Object variables#Using New or other Constructors|Using New or other Constructors]], <var>New</var> can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is <var>Null</var>:<p class="code">%screenReadErr = new


%unknown = %(ScreenReadError):new(Name='MYSTAT')
%screenReadErr = %(ScreenReadError):new


%unknown = %unknown:new(Name='MYSTAT')
%screenReadErr = %screenReadErr:new
</p>
</p>
</ul>
</ul>


[[Category:System exception classes]]
[[Category:System exception classes]]

Revision as of 19:27, 14 July 2014

The ScreenReadError exception class describes an exception associated with

To produce a ScreenReadError exception for yourself, you typically use a SOUL Throw statement with the New ScreenReadError constructor. For example, the following statement throws a ScreenReadError exception:

throw %(screenReadError):new

In addition to the New constructor that creates an object instance, the class includes a Name property that returns the invalid statistic name.

The ScreenReadError class is available as of Sirius Mods version 8.1.


The ScreenReadError methods

The following are the available ScreenReadError class methods.

MethodDescription
NewCreate a new ScreenReadError object

The methods in the class are described in the subsections that follow. In addition:

New constructor

Create a new ScreenReadError object (ScreenReadError class)

[Introduced in Sirius Mods 8.1]

This Constructor generates an instance of an ScreenReadError exception.

Syntax

%screenReadError = [%(ScreenReadError):]New

Syntax terms

%screenReadError An ScreenReadError object variable.
[%(ScreenReadError):] The class name in parentheses denotes a Constructor. See Usage notes, below, for more information about invoking an ScreenReadError Constructor.

Usage notes

  • As described in Using New or other Constructors, New can be invoked with no object, with an explicit class name, or with an object variable in the class, even if that object is Null:

    %screenReadErr = new %screenReadErr = %(ScreenReadError):new %screenReadErr = %screenReadErr:new