View Javadoc

1   package com.sri.emo.wizard.completion.persistence;
2   
3   
4   /***
5    * Exception that is thrown when some completion details are missing.
6    *
7    * @author Michael Rimov
8    * @version 1.0
9    */
10  public class IncompleteDetailsException extends RuntimeException {
11  
12      /***
13  	 * 
14  	 */
15  	private static final long serialVersionUID = 1L;
16  	private final CompletionDetails missingCompletionDetail;
17  
18  
19      public IncompleteDetailsException(String message, CompletionDetails missingDetail) {
20          super(message);
21          missingCompletionDetail = missingDetail;
22      }
23  
24      public IncompleteDetailsException(String message, Throwable cause, CompletionDetails missingDetail) {
25          super(message, cause);
26          missingCompletionDetail = missingDetail;
27      }
28  
29      public IncompleteDetailsException(Throwable cause, CompletionDetails missingDetail) {
30          super(cause);
31          missingCompletionDetail = missingDetail;
32      }
33  
34      public CompletionDetails getMissingDetail() {
35          return missingCompletionDetail;
36      }
37  
38      /***
39       * Returns a string representation of the object.
40       *
41       * @return a string representation of the object.
42       */
43      public String toString() {
44          return super.toString() + " Missing Completion Detail: " + missingCompletionDetail.toString();
45      }
46  
47  
48  }