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
ConstructorDescriptionDoes having Auditing turned on supply any additional information?BadDataReport
(String message, String data) Generic Bad Data Report, no exeptionBadDataReport
(String message, String data, Throwable cause) Basic Bad Data ReportBadDataReport
(String message, String data, Throwable cause, Auditable owner, AuditTrail auditTrail) BadDataReport for a general exception raised during Expression Execution with supplied audit infoBadDataReport
(String message, String data, ExpressionException cause) BadDataReport for an Exception raised during Expression ExecutionBadDataReport
(AbstractConfigurable c, String messageKey, String data) BadDataReport
(AbstractConfigurable c, String message, String data, Throwable cause) Expanded Bad Data Report for AbstractConfigurables.BadDataReport
(AbstractConfigurable c, String message, String data, Throwable cause, boolean additionalInfo) 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()
Return the full audit trail if it existsBuild a single line printable message for this Bad Data Reportprotected 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()Does having Auditing turned on supply any additional information? -
BadDataReport
-
BadDataReport
BadDataReport for an Exception raised during Expression Execution- Parameters:
message
- Message to displaydata
- Data causing errorcause
- Throwable that generated error
-
BadDataReport
public BadDataReport(String message, String data, Throwable cause, Auditable owner, AuditTrail auditTrail) BadDataReport for a general exception raised during Expression Execution with supplied audit info- Parameters:
message
- Message to displaydata
- Data causing errorcause
- Throwable that generated errorowner
- Owning componentauditTrail
- Audit Trail of expression execution
-
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
public BadDataReport(AbstractConfigurable c, String message, String data, Throwable cause, boolean additionalInfo) 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 erroradditionalInfo
- true if additional information is provided if auditing turned on.
-
BadDataReport
-
BadDataReport
-
-
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
Build a single line printable message for this Bad Data Report- Returns:
- message
-
getCause
-
getData
-
getAuditTrail
-
getAuditReport
-
getFullData
-