1 package net.obsearch.exception;
2
3 /*
4 OBSearch: a distributed similarity search engine
5 This project is to similarity search what 'bit-torrent' is to downloads.
6 Copyright (C) 2007 Arnoldo Jose Muller Molina
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22 /**
23 * Occurs when an internal id requested but the id is not available.
24 * This Exception is kept as a debugging aid. Normally you should
25 * not receive it. If you do, please report the problem to:
26 * http://code.google.com/p/obsearch/issues/list
27 * @author Arnoldo Jose Muller Molina
28 * @since 0.7
29 */
30
31 public class IllegalIdException
32 extends OBException {
33 private long id;
34 private byte[] idbytes;
35 public String toString(){
36 return "Illegal id was received :( : " + id;
37 }
38 public IllegalIdException(long id){
39 this.id = id;
40 }
41
42 public IllegalIdException(){
43 this.id = -1;
44 }
45 public IllegalIdException(byte[] i) {
46 this.idbytes = i;
47 }
48
49 }