29 lines
639 B
Objective-C
29 lines
639 B
Objective-C
//
|
|
// MPParseError.m
|
|
// MathPad
|
|
//
|
|
// Created by Kim Wittenburg on 06.09.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
#import "MPParseError.h"
|
|
|
|
@implementation MPParseError
|
|
|
|
- (instancetype)initWithErrorIndex:(NSUInteger)errorIndex errorMessageKey:(NSString *)errorMessageKey
|
|
{
|
|
self = [super init];
|
|
if (self) {
|
|
_errorIndex = errorIndex;
|
|
_localizedErrorMessage = NSLocalizedString(errorMessageKey, nil);
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (NSString *)description
|
|
{
|
|
return [NSString stringWithFormat:@"MPParseError<at=%ld message=\"%@\">", self.errorIndex, self.localizedErrorMessage];
|
|
}
|
|
|
|
@end
|