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