src/java/isac/wsdialog/DialogProtocolException.java
branchjava_rename_format
changeset 3922 fcd5648113ca
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/java/isac/wsdialog/DialogProtocolException.java	Wed Jun 15 18:31:02 2005 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +/*
     1.5 + * Created on Nov 18, 2003
     1.6 + */
     1.7 +package isac.wsdialog;
     1.8 +
     1.9 +/**
    1.10 + * Exception thrown by the DialogGuide if the action requested by the user does
    1.11 + * not match the state of the DialogGuide, e.g. specifying during the solving
    1.12 + * phase.
    1.13 + * 
    1.14 + * @author Alan Krempler
    1.15 + */
    1.16 +public class DialogProtocolException extends Exception {
    1.17 +
    1.18 +    protected int failed_action_;
    1.19 +
    1.20 +    protected int dialog_state_;
    1.21 +
    1.22 +    DialogProtocolException(int failed_action, int dialog_state, String extra,
    1.23 +            Throwable cause) {
    1.24 +        super("The DialogGuide cannot process a request.\n"
    1.25 +                + "Requested action: " + String.valueOf(failed_action)
    1.26 +                + ", Dialog state:" + String.valueOf(dialog_state) + ", "
    1.27 +                + extra);
    1.28 +        failed_action_ = failed_action;
    1.29 +        dialog_state_ = dialog_state;
    1.30 +    }
    1.31 +
    1.32 +    DialogProtocolException(int failed_action, int dialog_state) {
    1.33 +        this(failed_action, dialog_state, null, null);
    1.34 +    }
    1.35 +}
    1.36 \ No newline at end of file