src/java/isac/wsdialog/DialogProtocolException.java
branchjava_rename_format
changeset 3922 fcd5648113ca
equal deleted inserted replaced
963:b4896ce4d1b0 3922:fcd5648113ca
       
     1 /*
       
     2  * Created on Nov 18, 2003
       
     3  */
       
     4 package isac.wsdialog;
       
     5 
       
     6 /**
       
     7  * Exception thrown by the DialogGuide if the action requested by the user does
       
     8  * not match the state of the DialogGuide, e.g. specifying during the solving
       
     9  * phase.
       
    10  * 
       
    11  * @author Alan Krempler
       
    12  */
       
    13 public class DialogProtocolException extends Exception {
       
    14 
       
    15     protected int failed_action_;
       
    16 
       
    17     protected int dialog_state_;
       
    18 
       
    19     DialogProtocolException(int failed_action, int dialog_state, String extra,
       
    20             Throwable cause) {
       
    21         super("The DialogGuide cannot process a request.\n"
       
    22                 + "Requested action: " + String.valueOf(failed_action)
       
    23                 + ", Dialog state:" + String.valueOf(dialog_state) + ", "
       
    24                 + extra);
       
    25         failed_action_ = failed_action;
       
    26         dialog_state_ = dialog_state;
       
    27     }
       
    28 
       
    29     DialogProtocolException(int failed_action, int dialog_state) {
       
    30         this(failed_action, dialog_state, null, null);
       
    31     }
       
    32 }