X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2FBenchmarks%2FSSJava%2FMP3DecoderInfer%2FBitstreamException.java;h=9d88622f7e1c5a6b95161fec9ba9ca381bb51ff0;hb=70aff04c5bb5a7b5f5693a72a29a1abf97004e8d;hp=1889add6e7612f4bd99c03d368e3c0d057096076;hpb=7a0d4aea90f5e090be8341e7ab4a8d5e33c788f5;p=IRC.git diff --git a/Robust/src/Benchmarks/SSJava/MP3DecoderInfer/BitstreamException.java b/Robust/src/Benchmarks/SSJava/MP3DecoderInfer/BitstreamException.java index 1889add6..9d88622f 100644 --- a/Robust/src/Benchmarks/SSJava/MP3DecoderInfer/BitstreamException.java +++ b/Robust/src/Benchmarks/SSJava/MP3DecoderInfer/BitstreamException.java @@ -19,52 +19,46 @@ */ /** - * Instances of BitstreamException are thrown - * when operations on a Bitstream fail. + * Instances of BitstreamException are thrown when operations on a + * Bitstream fail. *

- * The exception provides details of the exception condition - * in two ways: - *

  1. - * as an error-code describing the nature of the error - *


  2. - * as the Throwable instance, if any, that was thrown - * indicating that an exceptional condition has occurred. - *

+ * The exception provides details of the exception condition in two ways: + *
    + *
  1. + * as an error-code describing the nature of the error

  2. + *
    + *
  3. + * as the Throwable instance, if any, that was thrown indicating + * that an exceptional condition has occurred.
  4. + *
+ *

* * @since 0.0.6 - * @author MDM 12/12/99 + * @author MDM 12/12/99 */ -public class BitstreamException extends JavaLayerException - implements BitstreamErrors -{ - private int errorcode = UNKNOWN_ERROR; - - public BitstreamException(String msg, Throwable t) - { - super(msg, t); - } - - public BitstreamException(int errorcode, Throwable t) - { - this(getErrorString(errorcode), t); - this.errorcode = errorcode; - } - - public int getErrorCode() - { - return errorcode; - } - - - static public String getErrorString(int errorcode) - { - // REVIEW: use resource bundle to map error codes - // to locale-sensitive strings. - -// return "Bitstream errorcode "+Integer.toHexString(errorcode); - return "Bitstream errorcode "+errorcode; - } - - +public class BitstreamException extends JavaLayerException implements BitstreamErrors { + private int errorcode = UNKNOWN_ERROR; + + public BitstreamException(String msg, Throwable t) { + super(msg, t); + } + + public BitstreamException(int errorcode, Throwable t) { + this(getErrorString(errorcode), t); + this.errorcode = errorcode; + } + + public int getErrorCode() { + return errorcode; + } + + static public String getErrorString(int errorcode) { + // REVIEW: use resource bundle to map error codes + // to locale-sensitive strings. + + // return "Bitstream errorcode "+Integer.toHexString(errorcode); + return "Bitstream errorcode " + errorcode; + } + }