Package VASSAL.build
Class BadDataReport
java.lang.Object
VASSAL.build.BadDataReport
General-purpose condition indicating that VASSAL has encountered data that's inconsistent with the current module.
A typical example would be failing to find a map/board/image/prototype from the supplied name. Covers a variety of
situations where the most likely cause is a module version compatibility issue.
This is for recoverable errors that occur during game play, as opposed to
IllegalBuildException
,
which covers errors when building a module- Author:
- rodneykinney
-
Constructor Summary
ConstructorDescriptionBadDataReport(String message, String data)
BadDataReport(String message, String data, Throwable cause)
Basic Bad Data ReportBadDataReport(AbstractConfigurable c, String messageKey, String data)
BadDataReport(AbstractConfigurable c, String message, String data, Throwable cause)
Expanded Bad Data Report for AbstractConfigurables.BadDataReport(PieceSlot slot, String message, String data)
Expanded Bad Data Report for PieceSlot Display the name of the slotBadDataReport(EditablePiece piece, String message)
BadDataReport(EditablePiece piece, String message, String data)
BadDataReport(EditablePiece piece, String message, String data, Throwable cause)
Expanded Bad Data Report called by Traits. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
getData()
protected static String
getPieceName(EditablePiece piece)
Return the name of the piece.boolean
Should this report be reported?void
setReportable(boolean reportable)
-
Constructor Details
-
BadDataReport
public BadDataReport() -
BadDataReport
Basic Bad Data Report- Parameters:
message
- Message to displaydata
- Data causing errorcause
- Throwable that generated error
-
BadDataReport
-
BadDataReport
Expanded Bad Data Report called by Traits. Display additional information to aid debugging NB. Note use of piece.getLocalizedName() rather than Decorator.getOuterMost().getLocalizedName() which can result in infinite BadData reporting loops.- Parameters:
piece
- Trait that generated the errormessage
- Resource message key to displaydata
- Data causing errorcause
- Throwable that generated error
-
BadDataReport
-
BadDataReport
-
BadDataReport
-
BadDataReport
Expanded Bad Data Report for AbstractConfigurables. Display the name and type of the Configurable- Parameters:
c
- AbstractConfigurable that generated the errormessage
- Resource message key to displaydata
- Data causing errorcause
- Throwable that generated error
-
BadDataReport
-
BadDataReport
Expanded Bad Data Report for PieceSlot Display the name of the slot- Parameters:
c
- PieceSlot that generated the errormessage
- Resource message key to displaydata
- Data causing error
-
-
Method Details
-
getPieceName
Return the name of the piece. For Decorators, return the name of the inner piece as the Bad Data Report may have been generated by the call to get the name of the Decorator in the first place.- Parameters:
piece
-- Returns:
-
isReportable
public boolean isReportable()Should this report be reported?- Returns:
- false if this report should be ignored
-
setReportable
public void setReportable(boolean reportable) -
getMessage
-
getCause
-
getData
-