gov.llnl.babel.msg

Class MsgList


public class MsgList
extends java.lang.Object

Contains a list of UserMsg, and displays various subsets of them
See Also:
UserMsg

Constructor Summary

MsgList()
Create an empty message list

Method Summary

void
addMsg(UserMsg msg)
Add a new message to the List
boolean
fatal_message()
Returns true iff a fatal message is included in the list.
void
print(java.io.PrintStream out)
void
setFatalCondition(int type, boolean setOrNot)
Set a particular type of message to trigger fatal errors, or not.
void
setPrintCondition(int type, boolean setOrNot)
Set a particular type of message to print or not.

Constructor Details

MsgList

public MsgList()
Create an empty message list

Method Details

addMsg

public void addMsg(UserMsg msg)
Add a new message to the List

fatal_message

public boolean fatal_message()
Returns true iff a fatal message is included in the list.

print

public void print(java.io.PrintStream out)

setFatalCondition

public void setFatalCondition(int type,
                              boolean setOrNot)
Set a particular type of message to trigger fatal errors, or not. By default errors are fatal, warnings and remarks are not. Note that internal errors are always fatal and cannot be changed.
Parameters:
type - one of UserMsg.ERROR, UserMsg.WARNING, or UserMsg.REMARK
setOrNot - true enables printing, false disables

setPrintCondition

public void setPrintCondition(int type,
                              boolean setOrNot)
Set a particular type of message to print or not. By default, errors and warnings are printed, remarks are not. Note that internal errors are always printed and cannot be suppressed.
Parameters:
type - one of UserMsg.ERROR, UserMsg.WARNING, or UserMsg.REMARK
setOrNot - true enables printing, false disables