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
public abstract static class PlayException.ExceptionSource extends PlayException
Adds source attachment to a Play exception.- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description ExceptionSource(String title, String description)ExceptionSource(String title, String description, Throwable cause)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Stringinput()PlayException.InterestingLinesinterestingLines(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 StringsourceName()The source file name if defined.StringtoString()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Method Detail
-
line
public abstract Integer line()
Error line number, if defined.- Returns:
- Error line number, if defined.
-
position
public abstract Integer position()
Column position, if defined.- Returns:
- Column position, if defined.
-
input
public abstract String input()
- Returns:
- Input stream used to read the source content.
Input stream used to read the source content.
-
sourceName
public abstract String sourceName()
The source file name if defined.- Returns:
- The source file name if defined.
-
interestingLines
public PlayException.InterestingLines interestingLines(int border)
Extracts interesting lines to be displayed to the user.- Parameters:
border- number of lines to use as a border- Returns:
- the extracted lines
-
toString
public String toString()
- Overrides:
toStringin classUsefulException
-
-