org.quasiliteral.syntax
Class NeedMoreException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.quasiliteral.syntax.NeedMoreException
All Implemented Interfaces:
Serializable

public class NeedMoreException
extends RuntimeException

Untamed: Thrown if the input end sooner than expected, to suggest how much the next line of input should be indented.

Author:
Mark S. Miller
See Also:
Serialized Form

Field Summary
private  int myCloseIndent
           
private  char myCloser
           
private  int myIndent
           
private  boolean myQuoted
           
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
NeedMoreException(String msg, boolean quoted, int indent, char closer, int closeIndent)
          Enabled: After msg, the remaining parameters are the same as for LineFeeder, with the same
 
Method Summary
 int getCloseIndent()
          Enabled:
 char getCloser()
          Enabled:
 int indent()
          Enabled:
 boolean isQuoted()
          Enabled:
 
Methods inherited from class java.lang.Throwable
backtrace, eStack, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, javaStack, leaf, printStackTrace, printStackTrace, printStackTrace, printThrowableOn, setStackTrace, toString, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myQuoted

private final boolean myQuoted

myIndent

private final int myIndent

myCloser

private final char myCloser

myCloseIndent

private final int myCloseIndent
Constructor Detail

NeedMoreException

public NeedMoreException(String msg,
                         boolean quoted,
                         int indent,
                         char closer,
                         int closeIndent)
Enabled: After msg, the remaining parameters are the same as for LineFeeder, with the same

Parameters:
msg - is the normal Exception message
quoted - Will this next line be taken as literal text? If so, then it should not be trimmed or indented. 'quoted' is true between double quotes, or between quasi-quotes when not inside a $ or @ hole.
indent - The suggested indentation level for the next line, unless the next line begins with closer.
closer - The character that would close the most recent unclosed openner.
closeIndent - The suggested indentation level for the next line if it does begin (after trimming) with closer.
Method Detail

isQuoted

public boolean isQuoted()
Enabled:


indent

public int indent()
Enabled:


getCloser

public char getCloser()
Enabled:


getCloseIndent

public int getCloseIndent()
Enabled:



comments?