diff options
author | Matt Windsor <mbw500@student.cs.york.ac.uk> | 2011-02-17 23:28:47 +0000 |
---|---|---|
committer | Matt Windsor <mbw500@student.cs.york.ac.uk> | 2011-02-17 23:28:47 +0000 |
commit | 8f3c9af4bb9edb599bdc6c8da24e74beee4e1bf1 (patch) | |
tree | 48c2dd82034844aa44c513369d494656efdc6fcb /src/uk/org/ury/database/exceptions/MissingCredentialsException.java |
Initial commit; initial work on the library viewer which can be run either as an applet or an application; database connection is set up to connect to localhost as testing has necessitated using a gSTM SSH tunnel.
Diffstat (limited to 'src/uk/org/ury/database/exceptions/MissingCredentialsException.java')
-rw-r--r-- | src/uk/org/ury/database/exceptions/MissingCredentialsException.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/uk/org/ury/database/exceptions/MissingCredentialsException.java b/src/uk/org/ury/database/exceptions/MissingCredentialsException.java new file mode 100644 index 0000000..2e45526 --- /dev/null +++ b/src/uk/org/ury/database/exceptions/MissingCredentialsException.java @@ -0,0 +1,52 @@ +/** + * + */ +package uk.org.ury.database.exceptions; + +/** + * Exception thrown when the database credentials required to + * log into the URY database under a user class are missing, + * and thus the log-in cannot continue. + * + * The best practice for handling a MissingCredentialsException + * is to attempt to log into the database with a less privileged + * user class or, if the credentials for read-only access are + * missing, give up. + * + * @author Matt Windsor + */ + +public class MissingCredentialsException extends Exception +{ + + /** + * + */ + + private static final long serialVersionUID = -397479334359858162L; + + + /** + * Construct a new MissingCredentialsException with a + * default reason. + */ + + public + MissingCredentialsException () + { + super ("Missing credentials."); + } + + + /** + * Construct a new MissingCredentialsException. + * + * @param reason The explanation for the exception. + */ + + public + MissingCredentialsException (String reason) + { + super (reason); + } +} |