Download Modelica Development Tooling for Eclipse

Transcript
4 ARCHITECTURE
33
at any other workable solutions.
4.4.4
Compiler Exceptions
org.modelica.mdt.core.compiler.CompilerException is the super class of exceptions that signal errors that occurs while communicating or trying to
establish a connection to the Modelica compiler.
• CompilerInstantiationException
CompilerInstantiationException is thrown when there was an error instantiating the compiler object specified by the plugin in the declaration of the extension org.modlica.mdt.compiler. The exception object’s
method getProblemType() provides more details on the problem encountered. For example, if there was more than one extension defined
of the compiler extension point, this exception is thrown.
• ConnectException
ConnectException is thrown when there is an error while trying to
establish a connection to the Modelica compiler. This exception can
be thrown from many methods due to the fact that connecting to the
compiler is implemented lazily. For example if the omc plugin fails to
find the compiler binary this exception is thrown.
• CommunicationException
CommunicationException is thrown when there was problems sending
a request to the compiler or receiving the reply. This can happen for
example if the compiler crashes and dumps core on some particularly
nasty request.
• UnexpectedReplyException
The UnexpectedReplyException exception is thrown when the compiler
replies with something not quite expected. For example if the compiler
replies with a string instead of the expected integer. This is typically a
sign of compatibility problems with the compiler or bugs in the compiler
or the plugin code.
• InvocationError
InvocationError is thrown when the compiler returns an error reply
instead of the usual reply. This can happen for example if the method
IModelicaCompiler.loadSourceFile() is invoked with a path to a nonexistent file.