The exception thrown by Rice

Exceptions of the Rice

The following 10 types of exceptions are thrown by executing Rice source.


TokenizerException

ReplicateException

RtypeException

VirtualMachineException

VirtualMachineNoClassException

InterPreterException

BreterException

UnknownException

UserException

RiceException


The details of exceptions are explained in the following sections.

TokenizerException

Rice converts the source code into a sequence of tokens. A token is the smallest component that has meaning as a Rice source code.

TokenizerException is an exception that is thrown when there are elements that can not be converted into tokens.

TokenizerException has the following properties.


TypeName : string : The type name of this exception(TokenizerException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

Val : string : String that failed tokenize.


TokenizerException is thrown from RiceManager 's constructor.

ReplicateException

When the RiceManager constructor is executed, Rice creates a prototype of the user-defined class from the source file and stores it in the prototype pool in association with the class name.

If the Rice is requested to create a user-defined class instance from the program, it returns a copy of the original instance stored in the prototype pool.

In Rice, the generation of user-defined class instance is called a replica operation to distinguish it from ordinary copy operation.


The replica operation is a recursive copy of fields. If this recursive copy fails, a ReplicateException is thrown.

ReplicateException has the following properties.


TypeName : string : The type name of this exception(ReplicateException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.

ReplicatedClassName : string : Class which is failed to replicate.

FieldName : string : Field which is failed to replicate.

FieldType : string : Class of field which is failed to replicate.


ReplicateException is thrown at run time.


ReplicateException is a remaining of the initial implementation of Rice. This exception will never occur from Rice's core system.

However, there is a possibility that this exception will be thrown from embedded classes. If you catch exceptions, we recommend that you also consider ReplicateException.

RtypeException

RtypeException is the exception that is thrown primarily when type related errors occur. Most of the reasons why an RtypeException is thrown is a type mismatch.

RtypeException has the following properties.


TypeName : string : The type name of this exception(RtypeException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.

ObjectType : string : Class that caused the exception.

Context : string : Member that caused the exception(fitter, getter, setter, method).

Signature : string : Signature that caused the exception.


RtypeException is thrown at run time.

VirtualMachineException

Rice adopts the concept of a stack machine as a virtual machine. A VirtualMachineException is thrown if the stack of the virtual machine is not in the correct state.

VirtualMachineException has the following properties.


TypeName : string : The type name of this exception(VirtualMachineException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.


VirtualMachineException is an exception for debugging. A VirtualMachineException never occurs at run time.

However, if you catch exceptions, we recommend that you also consider VirtualMachineException.

VirtualMachineNoClassException

VirtualMachineNoClassException is the exception that is thrown if the corresponding class does not exist.

VirtualMachineNoClassException has the following properties.


TypeName : string : The type name of this exception(VirtualMachineNoClassException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.

NoClassName : string : Class name which is not registered.


VirtualMachineNoClassException is thrown at run time.

InterPreterException

InterPreterException is an exception thrown for logical errors.

InterPreterException has the following properties.


TypeName : string : The type name of this exception(InterPreterException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.


InterPreterException is thrown at run time.

BreterException

BreterException is an exception thrown for syntax errors.

BreterException has the following properties.


TypeName : string : The type name of this exception(BreterException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.


BreterException is thrown at parse time. In other words, it is thrown from the constructor of RiceManager class.

UnknownException

UnknownException is the converted exception from .NET Framework exceptions.

UnknownException has the following properties.


TypeName : string : The type name of this exception(UnknownException).

OriginalExceptionTypeName : string : Exception type name in .NET Framework.

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.


UnknownException is thrown at run time.

UserException

UserException is the exception thrown by the user.

UserException has the following properties.


TypeName : string : The type name of this exception(UserException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

ClassName : string : Class name which the exception occurred.


UserException is thrown at run time.

RiceException

RiceException is the exception which is the parent class of the above exception group. The above exceptions are derived from RiceException.

RiceException has the following properties.


TypeName : string : The type name of this exception(RiceException).

Name : string: Message name

Message : string: Message indicating the details of the exception.

SourceFile : string : Path of the source file where the exception occurred.

NumberOfLine : int : Number of lines of source file where exception occurred.

StringOfLine : string : Source code of the line where the exception occurred.

Copyright © Rice All rights reserved.