1 /*
2 * @(#)$Id: AlgorithmException.java 689 2009-07-22 00:10:27Z bsigner $
3 *
4 * Author : Ueli Kurmann, igesture@uelikurmann.ch
5 *
6 * Purpose : Exception thrown by algorithms.
7 *
8 * -----------------------------------------------------------------------
9 *
10 * Revision Information:
11 *
12 * Date Who Reason
13 *
14 * Nov 23, 2006 ukurmann Initial Release
15 * Mar 14, 2007 bsigner Cleanup
16 *
17 * -----------------------------------------------------------------------
18 *
19 * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20 *
21 * This software is the proprietary information of ETH Zurich.
22 * Use is subject to license terms.
23 *
24 */
25
26
27 package org.ximtec.igesture.algorithm;
28
29 /**
30 * Exception thrown by algorithms.
31 *
32 * @version 1.0 Nov 2006
33 * @author Ueli Kurmann, igesture@uelikurmann.ch
34 * @author Beat Signer, signer@inf.ethz.ch
35 */
36 public class AlgorithmException extends Exception {
37
38 public enum ExceptionType {
39 Initialisation, Recognition
40 }
41
42 private ExceptionType exceptionType;
43
44
45 public AlgorithmException(ExceptionType exceptionType, Throwable throwable) {
46 super(throwable);
47 this.exceptionType = exceptionType;
48 }
49
50
51 public AlgorithmException(ExceptionType exceptionType) {
52 super();
53 this.exceptionType = exceptionType;
54 }
55
56
57 @Override
58 public String getMessage() {
59 switch (exceptionType) {
60 case Initialisation:
61 break;
62 case Recognition:
63 break;
64 }
65
66 return super.getMessage();
67 } // getMessage
68
69 }