Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathPad/MPParseError.m
2014-09-07 16:45:31 +02:00

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