View Javadoc

1   package com.sri.emo.wizard.creation.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      private final CreationDetails missingCompletionDetail;
13  
14  
15      public IncompleteDetailsException(String message, CreationDetails missingDetail) {
16          super(message);
17          missingCompletionDetail = missingDetail;
18      }
19  
20      public IncompleteDetailsException(String message, Throwable cause, CreationDetails missingDetail) {
21          super(message, cause);
22          missingCompletionDetail = missingDetail;
23      }
24  
25      public IncompleteDetailsException(Throwable cause, CreationDetails missingDetail) {
26          super(cause);
27          missingCompletionDetail = missingDetail;
28      }
29  
30      public CreationDetails getMissingDetail() {
31          return missingCompletionDetail;
32      }
33  
34      /***
35       * Returns a string representation of the object.
36       *
37       * @return a string representation of the object.
38       */
39      public String toString() {
40          return super.toString() + " Missing Completion Detail: " + missingCompletionDetail.toString();
41      }
42  
43  
44  }