root / Assets / Plugins / LitJson / JsonException.cs @ 11:01dde4258840
History | View | Annotate | Download (1.5 kB)
1 | #region Header |
---|---|
2 | /** |
3 | * JsonException.cs |
4 | * Base class throwed by LitJSON when a parsing error occurs. |
5 | * |
6 | * The authors disclaim copyright to this source code. For more details, see |
7 | * the COPYING file included with this distribution. |
8 | **/ |
9 | #endregion |
10 | |
11 | |
12 | using System; |
13 | |
14 | |
15 | namespace LitJson |
16 | { |
17 | public class JsonException : ApplicationException |
18 | { |
19 | public JsonException () : base () |
20 | { |
21 | } |
22 | |
23 | internal JsonException (ParserToken token) : |
24 | base (String.Format ( |
25 | "Invalid token '{0}' in input string", token)) |
26 | { |
27 | } |
28 | |
29 | internal JsonException (ParserToken token, |
30 | Exception inner_exception) : |
31 | base (String.Format ( |
32 | "Invalid token '{0}' in input string", token), |
33 | inner_exception) |
34 | { |
35 | } |
36 | |
37 | internal JsonException (int c) : |
38 | base (String.Format ( |
39 | "Invalid character '{0}' in input string", (char) c)) |
40 | { |
41 | } |
42 | |
43 | internal JsonException (int c, Exception inner_exception) : |
44 | base (String.Format ( |
45 | "Invalid character '{0}' in input string", (char) c), |
46 | inner_exception) |
47 | { |
48 | } |
49 | |
50 | |
51 | public JsonException (string message) : base (message) |
52 | { |
53 | } |
54 | |
55 | public JsonException (string message, Exception inner_exception) : |
56 | base (message, inner_exception) |
57 | { |
58 | } |
59 | } |
60 | } |