01: package com.mockrunner.example.ejb;
02:
03: /**
04: * Exception class for
05: * {@link PaySessionBean}.
06: */
07: public class PaySessionException extends Exception {
08: public final static int UNKNOWN = 0;
09: public final static int UNKNOWN_CUSTOMER = 1;
10: public final static int UNKNOWN_BILL = 2;
11: public final static int WRONG_BILL_FOR_CUSTOMER = 3;
12: public final static int WRONG_AMOUNT_FOR_BILL = 4;
13:
14: private int code = UNKNOWN;
15:
16: public PaySessionException(int code) {
17: this .code = code;
18: }
19:
20: public int getCode() {
21: return code;
22: }
23: }
|