source: tol/TolJava/TOLJava/src/com/hcarralero/toljava/TOLMachineException.java @ 9887b93

1941-docker-image-to-testdevel
Last change on this file since 9887b93 was 9887b93, checked in by Humberto Carralero <hacarralero@…>, 15 years ago

Importing TolJava

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3900 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 2.0 KB
Line 
1package com.hcarralero.toljava;
2
3/**
4 * Representa una condición de error ocurrida durante el acceso a un objeto de
5 * tipo <code>TOLMachine</code>.
6 *
7 * @author Humberto Andrés Carralero López (hcarralero@gmail.com)
8 * @version 1.0
9 */
10public class TOLMachineException extends Exception {
11
12    /**
13     * No ha ocurrido ningún error (¡IMPOSIBLE!).
14     *
15     */
16    public static final int NO_ERROR = 0;
17
18    /**
19     * ERROR: Fallo Interno de la Máquina Virtual de Java.
20     *
21     */
22    public static final int  ERROR_INTERNAL_JVM_ERROR= 1;
23
24    /**
25     * ERROR: Variable NO ENCONTRADA.
26     *
27     */
28    public static final int  ERROR_VARIABLE_NOT_FOUND= 2;
29
30    /**
31     * ERROR: Tipos de datos NO COINCIDEN.
32     *
33     */
34    public static final int  ERROR_MISMATCH_DATATYPES= 3;
35
36    /**
37     * ERROR: Fallo Interno de TOL.
38     *
39     */
40    public static final int  ERROR_INTERNAL_TOL_ERROR= 4;
41
42    /**
43     * ERROR: Parámetro NO VÁLIDO en llamada a Función.
44     *
45     */
46    public static final int  ERROR_INVALID_PARAMETER= 5;
47
48    /**
49     * ERROR: Fecha NO VÁLIDA para una Serie o TimeSet.
50     *
51     */
52    public static final int  ERROR_INVALID_DATE= 6;
53
54    /**
55     * ERROR: Índice NO VÁLIDO para una Serie, un TimeSet o un Set.
56     *
57     */
58    public static final int  ERROR_INVALID_INDEX= 7;
59
60    private int errorCode = NO_ERROR;
61
62    /**
63     * Retorna el código del error que provocó que se lanzara la excepción.
64     *
65     * @return el código del error.
66     */
67    public int getErrorCode() {
68        return errorCode;
69    }
70
71    /**
72     * Construye una instancia de <code>TOLMachineException</code> con el código y mensaje de error especificados.
73     * @param errorCode Código del error que provocó que se lanzara la excepción.
74     * @param msg mensaje describiendo el error que provocó que se lanzara la excepción.
75     */
76    public TOLMachineException(int errorCode, String msg) {
77        super(msg);
78        this.errorCode= errorCode;
79    }
80}
Note: See TracBrowser for help on using the repository browser.