Package play.api
Class PlayException.ExceptionSource
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
play.api.UsefulException
play.api.PlayException
play.api.PlayException.ExceptionSource
- All Implemented Interfaces:
Serializable
- Enclosing class:
- PlayException
Adds source attachment to a Play exception.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class play.api.PlayException
PlayException.ExceptionAttachment, PlayException.ExceptionSource, PlayException.InterestingLines, PlayException.RichDescription -
Field Summary
Fields inherited from class play.api.UsefulException
cause, description, id, title -
Constructor Summary
ConstructorsConstructorDescriptionExceptionSource(String title, String description) ExceptionSource(String title, String description, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringinput()interestingLines(int border) Extracts interesting lines to be displayed to the user.abstract Integerline()Error line number, if defined.abstract Integerposition()Column position, if defined.abstract StringThe source file name if defined.toString()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ExceptionSource
-
ExceptionSource
-
-
Method Details
-
line
Error line number, if defined.- Returns:
- Error line number, if defined.
-
position
Column position, if defined.- Returns:
- Column position, if defined.
-
input
- Returns:
- Input stream used to read the source content.
Input stream used to read the source content.
-
sourceName
The source file name if defined.- Returns:
- The source file name if defined.
-
interestingLines
Extracts interesting lines to be displayed to the user.- Parameters:
border- number of lines to use as a border- Returns:
- the extracted lines
-
toString
- Overrides:
toStringin classUsefulException
-