View Javadoc

1   package com.sri.common.dbobj;
2   
3   /***
4    * Error that is thrown when Repositories do not find the resulting object.
5    * Unlike RepositoryException that throws Runtime Exceptions, this particular
6    * error is expected to be handled and thus throws a regular exception.
7    *
8    * @author Michael Rimov
9    * @version 1.0
10   */
11  public class ObjectNotFoundException extends Exception {
12  
13      /***
14  	 * 
15  	 */
16  	private static final long serialVersionUID = 1L;
17  
18  
19  	/***
20       * Default constructor.
21       */
22      public ObjectNotFoundException() {
23          super();
24      }
25  
26      /***
27       * Constructor that takes a message.
28       *
29       * @param message String
30       */
31      public ObjectNotFoundException(final String message) {
32          super(message);
33      }
34  
35      /***
36       * Constructor that takes a nested exception/error.
37       *
38       * @param cause Throwable the nested error.
39       */
40      public ObjectNotFoundException(final Throwable cause) {
41          super(cause);
42      }
43  
44  
45      /***
46       * Constructor that takes a message and a nested exception.
47       *
48       * @param message String the message.
49       * @param cause   Throwable the underlying exception.
50       */
51      public ObjectNotFoundException(final String message, final Throwable cause) {
52          super(message, cause);
53      }
54  }