Package org.robwork.sdurw_core
Class Message
- java.lang.Object
-
- org.robwork.sdurw_core.Message
-
public class Message extends java.lang.Object
Standard type for user messages of robwork.
Messages are used for exception, warnings, and other things that are
reported to the user.
Message values should contain the source file name and line number so
that it is easy to look up the place in the code responsible for the
generation of the message.
RW_THROW and RW_WARN of macros.hpp have been introduced for the throwing
of exceptions and emission of warnings.
-
-
Constructor Summary
Constructors Constructor Description Message(long cPtr, boolean cMemoryOwn)
Message(java.lang.String file, int line)
Constructor
Messages of RobWork are all annotated by the originating file name,
the originating line number, and a message text for the user.
Supplying all the file, line, and message parameters can be a little
painfull, so a utility for creating messages is available from the
file macros.hpp.
Message(java.lang.String file, int line, java.lang.String message)
Constructor
Messages of RobWork are all annotated by the originating file name,
the originating line number, and a message text for the user.
Supplying all the file, line, and message parameters can be a little
painfull, so a utility for creating messages is available from the
file macros.hpp.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(Message obj)
java.lang.String
getFile()
The name of source file within which the message was
constructed.
java.lang.String
getFullText()
Returns a full description of the message containing file, line number and
message.int
getLine()
The line number for the file at where the message was
constructed.
java.lang.String
getText()
The message text meant for the user.
java.lang.String
toString()
-
-
-
Constructor Detail
-
Message
public Message(long cPtr, boolean cMemoryOwn)
-
Message
public Message(java.lang.String file, int line, java.lang.String message)
Constructor
Messages of RobWork are all annotated by the originating file name,
the originating line number, and a message text for the user.
Supplying all the file, line, and message parameters can be a little
painfull, so a utility for creating messages is available from the
file macros.hpp.
- Parameters:
file
- [in] The source file name.
line
- [in] The source file line number.
message
- [in] A message for a user.
-
Message
public Message(java.lang.String file, int line)
Constructor
Messages of RobWork are all annotated by the originating file name,
the originating line number, and a message text for the user.
Supplying all the file, line, and message parameters can be a little
painfull, so a utility for creating messages is available from the
file macros.hpp.
- Parameters:
file
- [in] The source file name.
line
- [in] The source file line number.
-
-
Method Detail
-
getCPtr
public static long getCPtr(Message obj)
-
delete
public void delete()
-
getFile
public java.lang.String getFile()
The name of source file within which the message was
constructed.
- Returns:
- The exception file name.
-
getLine
public int getLine()
The line number for the file at where the message was
constructed.
- Returns:
- The exception line number.
-
getText
public java.lang.String getText()
The message text meant for the user.
- Returns:
- The message text.
-
getFullText
public java.lang.String getFullText()
Returns a full description of the message containing file, line number and
message.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-