Archived
1

Cleaned Code by Removing Location Tracking for Errors

This commit is contained in:
Kim Wittenburg
2014-11-07 19:50:28 +01:00
parent 91e7dbe9f2
commit 139a75f816
59 changed files with 355 additions and 532 deletions

View File

@@ -9,6 +9,8 @@
#import "MPPowerFunction.h"
#import "MPExpression.h"
#import "MPExpressionTree.h"
@implementation MPPowerFunction
MPFunctionAccessorImplementation(ExponentExpression, _exponentExpression)
@@ -18,13 +20,13 @@ MPFunctionAccessorImplementation(ExponentExpression, _exponentExpression)
return @[@"exponentExpression"];
}
- (BOOL)validate:(MPParseError *__autoreleasing *)error
- (BOOL)validate:(NSError *__autoreleasing *)error
{
if (!self.baseValue) {
if (error) {
*error = MPParseError(NSMakeRange([self.parent convertIndex:[self.parent indexOfElement:self]
fromReferenceFrame:MPElementReferenceFrame
toReferenceFrame:MPSymbolReferenceFrame], 0), @"No Base for Power");
*error = MPParseError(11,
NSLocalizedString(@"No Base For Power.", @"Error message. This is displayed when a power does not have a base value."),
nil);
}
return NO;
}