Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created July 30, 2010 08:23
Show Gist options
  • Save frsyuki/500142 to your computer and use it in GitHub Desktop.
Save frsyuki/500142 to your computer and use it in GitHub Desktop.
public class MembershipError extends Exception {
public MembershipError(String message) {
super(message);
}
public static class JoinRequired extends MembershipError {
public JoinRequired(String message) {
super(message);
}
}
}
public class StorageError extends Exception {
public StorageError(String message) {
super(message);
}
public static class NotFound extends StorageError {
public NotFound(String message) {
super(message);
}
public static class UndefinedDataFamily extends NotFound {
public UndefinedDataFamily(String message) {
super(message);
}
}
}
}
public class User {
public static void main(String[] args) throws Exception {
throw new StorageError.NotFound.UndefinedDataFamily("specified data family is not undefined.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment