]> git.mjollnir.org Git - moodle.git/blob
b5808736d08b8785a3944222c7e804fea3686159
[moodle.git] /
1 /*
2 Adobe Systems Incorporated(r) Source Code License Agreement
3 Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
4         
5 Please read this Source Code License Agreement carefully before using
6 the source code.
7         
8 Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
9 no-charge, royalty-free, irrevocable copyright license, to reproduce,
10 prepare derivative works of, publicly display, publicly perform, and
11 distribute this source code and such derivative works in source or
12 object code form without any attribution requirements.
13         
14 The name "Adobe Systems Incorporated" must not be used to endorse or promote products
15 derived from the source code without prior written permission.
16         
17 You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
18 against any loss, damage, claims or lawsuits, including attorney's
19 fees that arise or result from your use or distribution of the source
20 code.
21         
22 THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
23 ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
24 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
26 NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
27 OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
33 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35
36 package com.adobe.serialization.json {
37
38       /**
39        * @private
40        */
41         public class JSONParseError extends Error       {
42         
43                 /** The location in the string where the error occurred */
44                 private var _location:int;
45                 
46                 /** The string in which the parse error occurred */
47                 private var _text:String;
48         
49                 /**
50                  * Constructs a new JSONParseError.
51                  *
52                  * @param message The error message that occured during parsing
53                  * @langversion ActionScript 3.0
54                  * @playerversion Flash 8.5
55                  * @tiptext
56                  */
57                 public function JSONParseError( message:String = "", location:int = 0, text:String = "") {
58                         super( message );
59                         //name = "JSONParseError";
60                         _location = location;
61                         _text = text;
62                 }
63
64                 /**
65                  * Provides read-only access to the location variable.
66                  *
67                  * @return The location in the string where the error occurred
68                  * @langversion ActionScript 3.0
69                  * @playerversion Flash 8.5
70                  * @tiptext
71                  */
72                 public function get location():int {
73                         return _location;
74                 }
75                 
76                 /**
77                  * Provides read-only access to the text variable.
78                  *
79                  * @return The string in which the error occurred
80                  * @langversion ActionScript 3.0
81                  * @playerversion Flash 8.5
82                  * @tiptext
83                  */
84                 public function get text():String {
85                         return _text;
86                 }
87         }
88         
89 }