InvalidSortSpecification class: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 49: Line 49:
<td>An <var>InvalidSortSpecification</var> %variable which will refer to the newly created object.
<td>An <var>InvalidSortSpecification</var> %variable which will refer to the newly created object.
</td></tr>
</td></tr>
<tr><th><var>%(InvalidSortSpecification)</var></th><td>The class name in parentheses denotes a shared method. <var>New</var> can also be invoked via an <var>InvalidSortSpecification</var> object variable, which may be <var>Null</var>.</td></tr>
<tr><th><var>%(InvalidSortSpecification)</var></th><td>The class name in parentheses denotes a shared method. <var>New</var> can also be invoked via an <var>InvalidSortSpecification</var> object variable.</td></tr>
</table>
</table>
   
   
   
   
[[Category:System exception classes]]
[[Category:System exception classes]]

Revision as of 18:07, 9 June 2011


An InvalidSortSpecification exception indicates that the first argument provided to either the Sort or SortNew method (in the Stringlist class) is not a valid sort specification.

This exception class has no properties. The class's only method is the New constructor, which you would typically use with a User Language Throw statement to produce an InvalidSortSpecification exception. For example:

throw %(invalidSortSpecification):new

Remember that catching an exception is done with the Catch statement; if an exception condition occurs outside a Catch for it, the request is cancelled.

In most cases, a sort specification is part of User Language code, and so should always be correct and request cancellation is an appropriate action. If, however, a sort specification can be entered at least in part by an end user, a Try/Catch block might be appropriate, as shown here:

try %strlist:sort(%sortSpec) catch invalidSortSpecification Print 'Invalid ...' ... end try

The InvalidSortSpecification class is available as of version 7.9.


The InvalidSortSpecification methods

The following are the available InvalidSortSpecification class methods.

MethodDescription
NewCreate a new InvalidSortSpecification object

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


New constructor

Create a new InvalidSortSpecification object (InvalidSortSpecification class)

[Introduced in Sirius Mods 7.9]

This callable constructor generates an instance of an InvalidSortSpecification exception. The New constructor format follows:

Syntax

%invalidSortSpecification = [%(InvalidSortSpecification):]New

Syntax terms

%invalidSortSpecification An InvalidSortSpecification %variable which will refer to the newly created object.
%(InvalidSortSpecification)The class name in parentheses denotes a shared method. New can also be invoked via an InvalidSortSpecification object variable.