Interface RuntimeErrorProducer
- All Known Subinterfaces:
SyntaxRuntimeErrorProducer
- All Known Implementing Classes:
ExprDisplayBillboard
,ExprDisplayGlowOverride
,ExprDisplayHeightWidth
,ExprDisplayInterpolation
,ExprDisplayShadow
,ExprDisplayTeleportDuration
,ExprDisplayTransformationRotation
,ExprDisplayTransformationScaleTranslation
,ExprDisplayViewRange
,ExprItemDisplayTransform
,ExprItemOfEntity
,ExprLootContextEntity
,ExprLootContextLocation
,ExprLootContextLooter
,ExprLootContextLuck
,ExprLootTable
,ExprLootTableSeed
,ExprLoveTime
,ExprQuaternionAxisAngle
,ExprTag
,ExprTagKey
,ExprTextDisplayAlignment
,ExprTextDisplayLineWidth
,ExprTextDisplayOpacity
,ExprTextOf
,ch.njol.skript.expressions.base.SimplePropertyExpression
public interface RuntimeErrorProducer
A RuntimeErrorProducer can throw runtime errors in a standardized and controlled manner.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Dispatches a runtime error with the given text.default void
Dispatches a runtime error with the given text and syntax highlighting.@NotNull ErrorSource
Gets the source of the errors produced by the implementing class.default RuntimeErrorManager
default void
Dispatches a runtime warning with the given text.default void
Dispatches a runtime warning with the given text and syntax highlighting.
-
Method Details
-
getErrorSource
Gets the source of the errors produced by the implementing class. Most extending interfaces should provide a default implementation of this method for ease of use.- Returns:
- The source of the error.
- See Also:
-
error
Dispatches a runtime error with the given text. Metadata will be provided along with the message, including line number, the docs name of the producer, and the line content.
Implementations should ensure they call super() to print the error.- Parameters:
message
- The text to display as the error message.
-
error
Dispatches a runtime error with the given text and syntax highlighting. Metadata will be provided along with the message, including line number, the docs name of the producer, and the line content.
Implementations should ensure they call super() to print the error.- Parameters:
message
- The text to display as the error message.highlight
- The text to highlight in the parsed syntax.
-
warning
Dispatches a runtime warning with the given text. Metadata will be provided along with the message, including line number, the docs name of the producer, and the line content.
Implementations should ensure they call super() to print the warning.- Parameters:
message
- The text to display as the error message.
-
warning
Dispatches a runtime warning with the given text and syntax highlighting. Metadata will be provided along with the message, including line number, the docs name of the producer, and the line content.
Implementations should ensure they call super() to print the warning.- Parameters:
message
- The text to display as the error message.highlight
- The text to highlight in the parsed syntax.
-
getRuntimeErrorManager
- Returns:
- The manager this producer will send errors to.
-