2008-11-18 03:16:38 +00:00
|
|
|
#region Header
|
2008-11-19 00:32:05 +00:00
|
|
|
/*
|
2008-11-18 03:16:38 +00:00
|
|
|
* JsonException.cs
|
|
|
|
|
* Base class throwed by LitJSON when a parsing error occurs.
|
|
|
|
|
*
|
|
|
|
|
* The authors disclaim copyright to this source code. For more details, see
|
|
|
|
|
* the COPYING file included with this distribution.
|
2008-11-19 00:32:05 +00:00
|
|
|
*/
|
2008-11-18 03:16:38 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace LitJson
|
|
|
|
|
{
|
2017-03-24 01:22:28 -04:00
|
|
|
[Serializable]
|
2008-11-18 03:16:38 +00:00
|
|
|
public class JsonException : ApplicationException
|
|
|
|
|
{
|
2019-10-08 20:20:32 -05:00
|
|
|
public JsonException ()
|
2008-11-18 03:16:38 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal JsonException (ParserToken token) :
|
2017-03-12 09:51:41 -05:00
|
|
|
base ($"Invalid token '{token}' in input string")
|
2008-11-18 03:16:38 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal JsonException (ParserToken token,
|
|
|
|
|
Exception inner_exception) :
|
2017-03-12 09:51:41 -05:00
|
|
|
base ($"Invalid token '{token}' in input string",
|
2008-11-18 03:16:38 +00:00
|
|
|
inner_exception)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal JsonException (int c) :
|
2017-03-12 09:51:41 -05:00
|
|
|
base ($"Invalid character '{(char) c}' in input string")
|
2008-11-18 03:16:38 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal JsonException (int c, Exception inner_exception) :
|
2017-03-12 09:51:41 -05:00
|
|
|
base ($"Invalid character '{(char) c}' in input string",
|
2008-11-18 03:16:38 +00:00
|
|
|
inner_exception)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JsonException (string message) : base (message)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JsonException (string message, Exception inner_exception) :
|
|
|
|
|
base (message, inner_exception)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|