Path: blob/main/src/lwjgl/java/paulscode/sound/SoundSystemException.java
8644 views
package paulscode.sound;12/**3* The SoundSystemException class is used to provide information about serious4* errors.5*<br><br>6*<b><i> SoundSystem License:</b></i><br><b><br>7* You are free to use this library for any purpose, commercial or otherwise.8* You may modify this library or source code, and distribute it any way you9* like, provided the following conditions are met:10*<br>11* 1) You may not falsely claim to be the author of this library or any12* unmodified portion of it.13*<br>14* 2) You may not copyright this library or a modified version of it and then15* sue me for copyright infringement.16*<br>17* 3) If you modify the source code, you must clearly document the changes18* made before redistributing the modified source code, so other users know19* it is not the original code.20*<br>21* 4) You are not required to give me credit for this library in any derived22* work, but if you do, you must also mention my website:23* http://www.paulscode.com24*<br>25* 5) I the author will not be responsible for any damages (physical,26* financial, or otherwise) caused by the use if this library or any part27* of it.28*<br>29* 6) I the author do not guarantee, warrant, or make any representations,30* either expressed or implied, regarding the use of this library or any31* part of it.32* <br><br>33* Author: Paul Lamb34* <br>35* http://www.paulscode.com36* </b>37*/38public class SoundSystemException extends Exception39{40/**41* Global identifier for no problem.42*/43public static final int ERROR_NONE = 0;44/**45* Global identifier for a generic exception.46*/47public static final int UNKNOWN_ERROR = 1;48/**49* Global identifier for a null parameter.50*/51public static final int NULL_PARAMETER = 2;52/**53* Global identifier for a class type mismatch.54*/55public static final int CLASS_TYPE_MISMATCH = 3;56/**57* Global identifier for the sound library does not exist.58*/59public static final int LIBRARY_NULL = 4;60/**61* Global identifier for the sound library does not exist.62*/63public static final int LIBRARY_TYPE = 5;6465/**66* Holds a global identifier indicating the type of exception.67*/68private int myType = UNKNOWN_ERROR;6970/**71* Constructor: Generic exception. Specify the error message.72*/73public SoundSystemException( String message )74{75super( message );76}7778/**79* Constructor: Specify the error message and type of exception.80* @param message Description of the problem.81* @param type Global identifier for type of exception.82*/83public SoundSystemException( String message, int type )84{85super( message );86myType = type;87}8889public int getType()90{91return myType;92}93}949596