org.pz.platypus.utilities
Class ErrorMsg

java.lang.Object
  extended by org.pz.platypus.utilities.ErrorMsg

public class ErrorMsg
extends java.lang.Object

Various Error Message-Generating Routines

Author:
alb

Constructor Summary
ErrorMsg()
           
 
Method Summary
static java.lang.String location(GDD gdd, Token tok)
          Most Platypus error messages start with the file# and line# where an error occurred.
static java.lang.String notAllowedInCode(GDD gdd, java.lang.String command, Source source)
          Logs warning when a command that is not supported in a code section is encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorMsg

public ErrorMsg()
Method Detail

location

public static java.lang.String location(GDD gdd,
                                        Token tok)
Most Platypus error messages start with the file# and line# where an error occurred. This method generates the literal of file and line numbers for the token, plus a ": ".

Parameters:
gdd - container that holds location of the literals file
tok - the erroneous token
Returns:
the file and line #s, or an empty string in case of error

notAllowedInCode

public static java.lang.String notAllowedInCode(GDD gdd,
                                                java.lang.String command,
                                                Source source)
Logs warning when a command that is not supported in a code section is encountered.

Parameters:
gdd - Global document data
command - the command root or, in some cases, the command string
source - the file# and line# where the command came from
Returns:
the string that's written to the logger (used primarily for testing), or "" if an error occurred


Copyright © 2008-10 Pacific Data Works LLC