~ubuntu-branches/ubuntu/jaunty/weka/jaunty

« back to all changes in this revision

Viewing changes to weka/core/parser/JFlex/ScannerException.java

  • Committer: Bazaar Package Importer
  • Author(s): Soeren Sonnenburg, Torsten Werner, Soeren Sonnenburg
  • Date: 2008-10-30 06:42:46 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081030064246-648zj038l155host
Tags: 3.5.8+cup1-1
[ Torsten Werner ]
* Update Section field in doc-base file.
* Add Class-Path attribute to jar file.

[ Soeren Sonnenburg ]
* Update my email address to sonne@debian.org.
* Update copyright.
* Remove build, java cup and jflex from orig.tar.gz.
* Add cup and jflex as build dependency.
* Patch weka source to use cup from debian.
* Patch weka shell wrapper to use java-6-sun or openjdk.
* Obtain documentation from svn.
* Build depend on texlive-latex-extra (required to generate documentation).
* Add javadoc as build target.
* Use java-wrappers to start weka.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
 
 * JFlex 1.4.1                                                             *
3
 
 * Copyright (C) 1998-2004  Gerwin Klein <lsf@jflex.de>                    *
4
 
 * All rights reserved.                                                    *
5
 
 *                                                                         *
6
 
 * This program is free software; you can redistribute it and/or modify    *
7
 
 * it under the terms of the GNU General Public License. See the file      *
8
 
 * COPYRIGHT for more information.                                         *
9
 
 *                                                                         *
10
 
 * This program is distributed in the hope that it will be useful,         *
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
13
 
 * GNU General Public License for more details.                            *
14
 
 *                                                                         *
15
 
 * You should have received a copy of the GNU General Public License along *
16
 
 * with this program; if not, write to the Free Software Foundation, Inc., *
17
 
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                 *
18
 
 *                                                                         *
19
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
20
 
 
21
 
package weka.core.parser.JFlex;
22
 
 
23
 
import java.io.File;
24
 
 
25
 
/**
26
 
 * This Exception could be thrown while scanning the specification 
27
 
 * (e.g. unmatched input)
28
 
 *
29
 
 * @author Gerwin Klein
30
 
 * @version JFlex 1.4.1, $Revision: 1.1 $, $Date: 2008/05/09 09:14:11 $
31
 
 */
32
 
public class ScannerException extends RuntimeException {
33
 
  
34
 
  public int line;
35
 
  public int column;
36
 
  public ErrorMessages message;
37
 
  public File file;
38
 
 
39
 
  private ScannerException(File file, String text, ErrorMessages message, int line, int column) {
40
 
    super(text);
41
 
    this.file    = file;
42
 
    this.message = message;
43
 
    this.line    = line;
44
 
    this.column  = column;
45
 
  }
46
 
 
47
 
 
48
 
  /**
49
 
   * Creates a new ScannerException with a message only.
50
 
   *
51
 
   * @param message   the code for the error description presented to the user.
52
 
   */
53
 
  public ScannerException(ErrorMessages message) {
54
 
    this( null, ErrorMessages.get(message), message, -1, -1 );
55
 
  }
56
 
 
57
 
  /**
58
 
   * Creates a new ScannerException for a file with a message only.
59
 
   *
60
 
   * @param file      the file in which the error occured
61
 
   * @param message   the code for the error description presented to the user.
62
 
   */
63
 
  public ScannerException(File file, ErrorMessages message) {
64
 
    this( file, ErrorMessages.get(message), message, -1, -1 );
65
 
  }
66
 
 
67
 
 
68
 
  /**
69
 
   * Creates a new ScannerException with a message and line number.
70
 
   *
71
 
   * @param message   the code for the error description presented to the user.
72
 
   * @param line      the number of the line in the specification that 
73
 
   *                  contains the error
74
 
   */
75
 
  public ScannerException(ErrorMessages message, int line) {
76
 
    this( null, ErrorMessages.get(message), message, line, -1 );
77
 
  }
78
 
 
79
 
 
80
 
  /**
81
 
   * Creates a new ScannerException for a file with a message and line number.
82
 
   *
83
 
   * @param message   the code for the error description presented to the user.
84
 
   * @param line      the number of the line in the specification that 
85
 
   *                  contains the error
86
 
   */
87
 
  public ScannerException(File file, ErrorMessages message, int line) {
88
 
    this( file, ErrorMessages.get(message), message, line, -1 );
89
 
  }
90
 
 
91
 
 
92
 
  /**
93
 
   * Creates a new ScannerException with a message, line number and column.
94
 
   *
95
 
   * @param message   the code for the error description presented to the user.
96
 
   * @param line      the number of the line in the specification that 
97
 
   *                  contains the error
98
 
   * @param column    the column where the error starts
99
 
   */
100
 
  public ScannerException(File file, ErrorMessages message, int line, int column) {
101
 
    this( file, ErrorMessages.get(message), message, line, column );
102
 
  }
103
 
 
104
 
}