16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "config.h"
#include <stdlib.h>
#import "OFInvalidJSONException.h"
#import "OFString.h"
@implementation OFInvalidJSONException
+ (instancetype)exceptionWithString: (OFString*)string
line: (size_t)line
{
return [[[self alloc] initWithString: string
line: line] autorelease];
|
>
>
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "config.h"
#include <stdlib.h>
#import "OFInvalidJSONException.h"
#import "OFString.h"
#import "macros.h"
@implementation OFInvalidJSONException
+ (instancetype)exceptionWithString: (OFString*)string
line: (size_t)line
{
return [[[self alloc] initWithString: string
line: line] autorelease];
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
{
return [OFString stringWithFormat:
@"The JSON representation is invalid in line %zu!", _line];
}
- (OFString*)string
{
return _string;
}
- (size_t)line
{
return _line;
}
@end
|
|
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
{
return [OFString stringWithFormat:
@"The JSON representation is invalid in line %zu!", _line];
}
- (OFString*)string
{
OF_GETTER(_string, true)
}
- (size_t)line
{
return _line;
}
@end
|