EMMA Coverage Report (generated Sat Nov 03 21:53:04 GMT 2007)
[all classes][sf.qof.exception]

COVERAGE SUMMARY FOR SOURCE FILE [SqlParserException.java]

nameclass, %method, %block, %line, %
SqlParserException.java100% (1/1)75%  (3/4)80%  (16/20)75%  (6/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SqlParserException100% (1/1)75%  (3/4)80%  (16/20)75%  (6/8)
SqlParserException (String): void 0%   (0/1)0%   (0/4)0%   (0/2)
SqlParserException (String, int, int): void 100% (1/1)100% (10/10)100% (4/4)
getLength (): int 100% (1/1)100% (3/3)100% (1/1)
getStart (): int 100% (1/1)100% (3/3)100% (1/1)

1/*
2 * Copyright 2007 brunella ltd
3 *
4 * Licensed under the LGPL Version 3 (the "License");
5 * you may not use this file except in compliance with the License.
6 *
7 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
8 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
11 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
12 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
13 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
14 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
15 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
17 * THE POSSIBILITY OF SUCH DAMAGE.
18 */
19package sf.qof.exception;
20 
21/**
22 * A parsing exception.
23 * Thrown by the <code>SqlParser</code>
24 *
25 * @see sf.qof.parser.SqlParser
26 */
27public class SqlParserException extends RuntimeException {
28 
29  private static final long serialVersionUID = -4719857605238942051L;
30  
31  private int start;
32  private int length;
33 
34  /**
35   * Creates a SqlParserException.
36   * 
37   * @param message  the error message
38   */
39  public SqlParserException(String message) {
40    super(message);
41  }
42  
43  /**
44   * Creates a SqlParserException.
45   * 
46   * @param message  the error message
47   * @param start    start position in SQL statement
48   * @param length   length of error in SQL statement
49   */
50  public SqlParserException(String message, int start, int length) {
51    super(message);
52    this.start = start;
53    this.length = length;
54  }
55 
56  /**
57   * Returns start position of error in SQL statement.
58   * 
59   * @return start position
60   */
61  public int getStart() {
62    return start;
63  }
64 
65  /**
66   * Returns length of error in SQL statement.
67   * 
68   * @return length
69   */
70  public int getLength() {
71    return length;
72  }
73  
74}

[all classes][sf.qof.exception]
EMMA 2.0.5312 (C) Vladimir Roubtsov