org.jfugue
Class JFugueException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.jfugue.JFugueException
All Implemented Interfaces:
java.io.Serializable

public class JFugueException
extends java.lang.RuntimeException

Handles JFugue parsing exceptions.

Version:
2.0
Author:
David Koelle
See Also:
Serialized Form

Field Summary
static java.lang.String CONTROL_EXC
          The index of the Controller command, Xindex=value, is not a valid controller.
static java.lang.String CONTROL_FORMAT_EXC
          The Controller command, Xindex=value, is malformed.
static java.lang.String ERROR_PLAYING_MUSIC
          Error playing music
static java.lang.String ERROR_SLEEP
          Error while sleep
static java.lang.String EXPECTED_BYTE
          The parser expected a byte.
static java.lang.String EXPECTED_DOUBLE
          The parser expected a double.
static java.lang.String EXPECTED_INT
          The parser expected an int.
static java.lang.String EXPECTED_LONG
          The parser expected a long.
static java.lang.String GENERAL_ERROR
          General error
static java.lang.String INSTRUMENT_EXC
          The Instrument command, Iinstrument, is not a valid instrument.
static java.lang.String INTELLIGENT_RESOLVER_FAILED
          Error resolving MidiDevice with Intelligent Resolver
static java.lang.String KEYSIG_EXC
          The KeySignature command, Kkeysig, is poorly formed.
static java.lang.String LAYER_EXC
          The Layer command, Llayer, is out of range.
static java.lang.String NOTE_DURATION_EXC
          The Duration part of the MusicString has an error.
static java.lang.String NOTE_EXC
          The Note command does not specify a valid percussion sound.
static java.lang.String NOTE_OCTAVE_EXC
          The Octave value calculated by the parser is out of range.
static java.lang.String OCTAVE_EXC
          The Octave specifier within the Note command is out of range.
static java.lang.String PARSER_SPACES_EXC
          The parser encountered spaces in a single token.
static java.lang.String PLAYS_STRING_NOT_FILE_EXC
          Player.play(String) plays a music string, not a filename
static java.lang.String SEQUENCER_DEVICE_NOT_SUPPORTED
          The MIDI System cannot instantiate a sequencer.
static java.lang.String SEQUENCER_DEVICE_NOT_SUPPORTED_WITH_EXCEPTION
          The MIDI System cannot instantiate a sequencer.
static java.lang.String TEMPO_EXC
          The Tempo command, Ttempo, is out of range.
static java.lang.String VOICE_EXC
          The Voice command, Vvoice, is out of range.
static java.lang.String WORD_NOT_DEFINED_EXC
          The parser cannot find a definition for the given word.
 
Constructor Summary
JFugueException(java.lang.String exc)
          Create a new JFugueException.
JFugueException(java.lang.String exc, java.lang.String token)
          Create a new JFugueException.
JFugueException(java.lang.String exc, java.lang.String param, java.lang.String token)
          Create a new JFugueException.
 
Method Summary
 
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
 

Field Detail

VOICE_EXC

public static final java.lang.String VOICE_EXC
The Voice command, Vvoice, is out of range.

See Also:
Constant Field Values

TEMPO_EXC

public static final java.lang.String TEMPO_EXC
The Tempo command, Ttempo, is out of range.

See Also:
Constant Field Values

KEYSIG_EXC

public static final java.lang.String KEYSIG_EXC
The KeySignature command, Kkeysig, is poorly formed.

See Also:
Constant Field Values

LAYER_EXC

public static final java.lang.String LAYER_EXC
The Layer command, Llayer, is out of range.

See Also:
Constant Field Values

INSTRUMENT_EXC

public static final java.lang.String INSTRUMENT_EXC
The Instrument command, Iinstrument, is not a valid instrument.

See Also:
Constant Field Values

CONTROL_EXC

public static final java.lang.String CONTROL_EXC
The index of the Controller command, Xindex=value, is not a valid controller.

See Also:
Constant Field Values

NOTE_EXC

public static final java.lang.String NOTE_EXC
The Note command does not specify a valid percussion sound.

See Also:
Constant Field Values

OCTAVE_EXC

public static final java.lang.String OCTAVE_EXC
The Octave specifier within the Note command is out of range.

See Also:
Constant Field Values

NOTE_OCTAVE_EXC

public static final java.lang.String NOTE_OCTAVE_EXC
The Octave value calculated by the parser is out of range.

See Also:
Constant Field Values

NOTE_DURATION_EXC

public static final java.lang.String NOTE_DURATION_EXC
The Duration part of the MusicString has an error.

See Also:
Constant Field Values

PARSER_SPACES_EXC

public static final java.lang.String PARSER_SPACES_EXC
The parser encountered spaces in a single token.

See Also:
Constant Field Values

WORD_NOT_DEFINED_EXC

public static final java.lang.String WORD_NOT_DEFINED_EXC
The parser cannot find a definition for the given word.

See Also:
Constant Field Values

CONTROL_FORMAT_EXC

public static final java.lang.String CONTROL_FORMAT_EXC
The Controller command, Xindex=value, is malformed.

See Also:
Constant Field Values

EXPECTED_BYTE

public static final java.lang.String EXPECTED_BYTE
The parser expected a byte.

See Also:
Constant Field Values

EXPECTED_LONG

public static final java.lang.String EXPECTED_LONG
The parser expected a long.

See Also:
Constant Field Values

EXPECTED_INT

public static final java.lang.String EXPECTED_INT
The parser expected an int.

See Also:
Constant Field Values

EXPECTED_DOUBLE

public static final java.lang.String EXPECTED_DOUBLE
The parser expected a double.

See Also:
Constant Field Values

SEQUENCER_DEVICE_NOT_SUPPORTED_WITH_EXCEPTION

public static final java.lang.String SEQUENCER_DEVICE_NOT_SUPPORTED_WITH_EXCEPTION
The MIDI System cannot instantiate a sequencer.

See Also:
Constant Field Values

SEQUENCER_DEVICE_NOT_SUPPORTED

public static final java.lang.String SEQUENCER_DEVICE_NOT_SUPPORTED
The MIDI System cannot instantiate a sequencer.

See Also:
Constant Field Values

PLAYS_STRING_NOT_FILE_EXC

public static final java.lang.String PLAYS_STRING_NOT_FILE_EXC
Player.play(String) plays a music string, not a filename

See Also:
Constant Field Values

ERROR_PLAYING_MUSIC

public static final java.lang.String ERROR_PLAYING_MUSIC
Error playing music

See Also:
Constant Field Values

ERROR_SLEEP

public static final java.lang.String ERROR_SLEEP
Error while sleep

See Also:
Constant Field Values

INTELLIGENT_RESOLVER_FAILED

public static final java.lang.String INTELLIGENT_RESOLVER_FAILED
Error resolving MidiDevice with Intelligent Resolver

See Also:
Constant Field Values

GENERAL_ERROR

public static final java.lang.String GENERAL_ERROR
General error

See Also:
Constant Field Values
Constructor Detail

JFugueException

public JFugueException(java.lang.String exc)
Create a new JFugueException.

Parameters:
exc - The string representing the exception.

JFugueException

public JFugueException(java.lang.String exc,
                       java.lang.String token)
Create a new JFugueException.

Parameters:
exc - The string representing the exception. This should contain the * character, so 'param' can be placed into the string.
token - The token or dictionary entry in which the exception has been discovered

JFugueException

public JFugueException(java.lang.String exc,
                       java.lang.String param,
                       java.lang.String token)
Create a new JFugueException.

Parameters:
exc - The string representing the exception. This should contain the * character, so 'param' can be placed into the string.
param - The direct object of the exception, the thing that has had some problem with it
token - The token or dictionary entry in which the exception has been discovered