Package uk.ac.starlink.table.formats
Class ErrorMode
java.lang.Object
uk.ac.starlink.table.formats.ErrorMode
Defines how error messages are reported.
- Since:
- 30 Apr 2021
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ErrorMode
Messages are thrown as TableFormatExceptions, probably causing read failure.static final ErrorMode
Messages are ignored.static final ErrorMode[]
Known values.static final ErrorMode
Messages are written as WARNINGs through the logging system. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
IGNORE
Messages are ignored. -
WARN
Messages are written as WARNINGs through the logging system. -
FAIL
Messages are thrown as TableFormatExceptions, probably causing read failure. -
OPTIONS
Known values.
-
-
Constructor Details
-
ErrorMode
Constructor.- Parameters:
name
- mode nameisReport
- true if text reports are ever used for anything
-
-
Method Details
-
isReport
public boolean isReport()Returns true if text reports submitted may ever be used for any purpose. If this returns false, there's no point submitting reports.- Returns:
- true if reports may be used
-
toString
Returns this option's name. -
report
Consumes a report string in a way appropriate for this mode.- Parameters:
msg
- message to report- Throws:
IOException
-