0001    // JSONParseError.swift
0002    //
0003    // The MIT License (MIT)
0004    //
0005    // Copyright (c) 2015 Zewo
0006    //
0007    // Permission is hereby granted, free of charge, to any person obtaining a copy
0008    // of this software and associated documentation files (the "Software"), to deal
0009    // in the Software without restriction, including without limitation the rights
0010    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0011    // copies of the Software, and to permit persons to whom the Software is
0012    // furnished to do so, subject to the following conditions:
0013    //
0014    // The above copyright notice and this permission notice shall be included in all
0015    // copies or substantial portions of the Software.
0016    //
0017    // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0018    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0019    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0020    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0021    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0022    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0023    // SOFTWARE.
0024    //
0025    // This file has been modified from its original project Swift-JsonSerializer
0026    
0027    enum JSONParseError
JSONParser.swift:70
            throw JSONParseError.ExtraTokenError(
JSONParser.swift:85
            throw JSONParseError.InsufficientTokenError(
JSONParser.swift:100
        case (let c): throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:124
            throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:142
                    throw JSONParseError.InvalidStringError(
JSONParser.swift:154
                    throw JSONParseError.InvalidStringError(
JSONParser.swift:167
            throw JSONParseError.InvalidStringError(
JSONParser.swift:224
            throw JSONParseError.InvalidStringError(
JSONParser.swift:232
            throw JSONParseError.InvalidNumberError(
JSONParser.swift:257
                throw JSONParseError.InvalidNumberError(
JSONParser.swift:288
                throw JSONParseError.InvalidNumberError(
JSONParser.swift:315
                    throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:332
                    throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:339
                throw JSONParseError.NonStringKeyError(
JSONParser.swift:367
                throw JSONParseError.UnexpectedTokenError(
: ErrorType, CustomStringConvertible { 0028 case UnexpectedTokenError
JSONParseError.swift:37
        case UnexpectedTokenError(let r, let l, let c):
JSONParser.swift:100
        case (let c): throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:124
            throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:315
                    throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:332
                    throw JSONParseError.UnexpectedTokenError(
JSONParser.swift:367
                throw JSONParseError.UnexpectedTokenError(
(reason: String, lineNumber: Int, columnNumber: Int) 0029 case InsufficientTokenError
JSONParseError.swift:39
        case InsufficientTokenError(let r, let l, let c):
JSONParser.swift:85
            throw JSONParseError.InsufficientTokenError(
(reason: String, lineNumber: Int, columnNumber: Int) 0030 case ExtraTokenError
JSONParseError.swift:41
        case ExtraTokenError(let r, let l, let c):
JSONParser.swift:70
            throw JSONParseError.ExtraTokenError(
(reason: String, lineNumber: Int, columnNumber: Int) 0031 case NonStringKeyError
JSONParseError.swift:43
        case NonStringKeyError(let r, let l, let c):
JSONParser.swift:339
                throw JSONParseError.NonStringKeyError(
(reason: String, lineNumber: Int, columnNumber: Int) 0032 case InvalidStringError
JSONParseError.swift:45
        case InvalidStringError(let r, let l, let c):
JSONParser.swift:142
                    throw JSONParseError.InvalidStringError(
JSONParser.swift:154
                    throw JSONParseError.InvalidStringError(
JSONParser.swift:167
            throw JSONParseError.InvalidStringError(
JSONParser.swift:224
            throw JSONParseError.InvalidStringError(
(reason: String, lineNumber: Int, columnNumber: Int) 0033 case InvalidNumberError
JSONParseError.swift:47
        case InvalidNumberError(let r, let l, let c):
JSONParser.swift:232
            throw JSONParseError.InvalidNumberError(
JSONParser.swift:257
                throw JSONParseError.InvalidNumberError(
JSONParser.swift:288
                throw JSONParseError.InvalidNumberError(
(reason: String, lineNumber: Int, columnNumber: Int) 0034 0035 var description: String { 0036 switch self { 0037 case UnexpectedTokenError(let r, let l, let c): 0038 return "UnexpectedTokenError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0039 case InsufficientTokenError(let r, let l, let c): 0040 return "InsufficientTokenError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0041 case ExtraTokenError(let r, let l, let c): 0042 return "ExtraTokenError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0043 case NonStringKeyError(let r, let l, let c): 0044 return "NonStringKeyError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0045 case InvalidStringError(let r, let l, let c): 0046 return "InvalidStringError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0047 case InvalidNumberError(let r, let l, let c): 0048 return "InvalidNumberError!\nLine: \(l)\nColumn: \(c)]\nReason: \(r)" 0049 } 0050 } 0051 }