com.partnersoft.io
Class FileParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.partnersoft.io.FileParseException
All Implemented Interfaces:
java.io.Serializable

public class FileParseException
extends java.lang.Exception

An exception occurring during parsing of a text file, generally accompanied by line and character position and perhaps a snippet of text. This can be used by a smart log viewer to pop open the file to the given position for troubleshooting.

Since parsing may be performed on things other than actual filesystem Files, the "File" part of this is represented by a generic Resource object.

Copyright 2006 Partner Software, Inc.

Version:
$Id: FileParseException.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis
See Also:
Serialized Form

Constructor Summary
FileParseException(java.lang.Throwable cause, VfsFile file, java.lang.String description, int linePosition, int characterPosition, java.lang.String snippet)
           
FileParseException(VfsFile file, java.lang.String description, int linePosition, int characterPosition)
           
FileParseException(VfsFile file, java.lang.String description, int linePosition, int characterPosition, java.lang.String snippet)
           
 
Method Summary
 int getCharacterPosition()
           
 java.lang.String getDescription()
           
 VfsFile getFile()
           
 int getLinePosition()
           
 java.lang.String getSnippet()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileParseException

public FileParseException(VfsFile file,
                          java.lang.String description,
                          int linePosition,
                          int characterPosition)

FileParseException

public FileParseException(VfsFile file,
                          java.lang.String description,
                          int linePosition,
                          int characterPosition,
                          java.lang.String snippet)

FileParseException

public FileParseException(java.lang.Throwable cause,
                          VfsFile file,
                          java.lang.String description,
                          int linePosition,
                          int characterPosition,
                          java.lang.String snippet)
Method Detail

getCharacterPosition

public int getCharacterPosition()

getDescription

public java.lang.String getDescription()

getLinePosition

public int getLinePosition()

getFile

public VfsFile getFile()

getSnippet

public java.lang.String getSnippet()