01: // StoreClassVersionException.java
02: // $Id: StoreClassVersionException.java,v 1.2 2000/08/16 21:37:55 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996-1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.tools.resources.store;
07:
08: /**
09: * This is exception gets thrown if an invalid resource store is detected.
10: */
11:
12: public class StoreClassVersionException extends Exception {
13: /**
14: * Version of the class that wanted to load the store.
15: */
16: int loader = -1;
17: /**
18: * Version of the class that saved the store.
19: */
20: int saver = -1;
21:
22: /**
23: * Get the loader's class version.
24: * @return An integer version number.
25: */
26:
27: public int getLoaderClassVersion() {
28: return loader;
29: }
30:
31: /**
32: * Get the saver's class version.
33: * @return An integer version number.
34: */
35:
36: public int getSaverClassVersion() {
37: return saver;
38: }
39:
40: public StoreClassVersionException(int loader, int saver) {
41: super ("invalid store class " + loader + " saved by " + saver);
42: this.loader = loader;
43: this.saver = saver;
44: }
45:
46: }
|