You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm parsing a simple string that looks like this:
[Abc]
This parses fine, but when the app checks 'Abc', it's not valid so I'm raising an error by using the [parser raise:@"..."]; statement.
At the moment I get an error which when dumped to the logs, looks like this:
Error Domain=PEGKitErrorDomain Code=1 "Failed to match next input token" UserInfo=0x7f9a7b710710 {NSLocalizedDescription=Failed to match next input token, range=NSRange: {9223372036854775807, 5}, lineNumber=Unknown, NSLocalizedFailureReason=Unable to find any runtime object called Abc
Line : Unknown
}
My error message seems to only be accessible through the localizedFailureReason and wrapped with line feeds. IN my case I want to do other things with it.
I'd like to have the peg kit actually put my error message as the description. I'm also not sure what the range is meant to represent as any time I see an error, it always seems to be x,5. With neither the 5 or the 5 having anything to do with the location of error as far as I can tell.
Can this be improved?
The text was updated successfully, but these errors were encountered:
Hi. I'm parsing a simple string that looks like this:
[Abc]
This parses fine, but when the app checks 'Abc', it's not valid so I'm raising an error by using the
[parser raise:@"..."];
statement.At the moment I get an error which when dumped to the logs, looks like this:
My error message seems to only be accessible through the localizedFailureReason and wrapped with line feeds. IN my case I want to do other things with it.
I'd like to have the peg kit actually put my error message as the description. I'm also not sure what the range is meant to represent as any time I see an error, it always seems to be x,5. With neither the 5 or the 5 having anything to do with the location of error as far as I can tell.
Can this be improved?
The text was updated successfully, but these errors were encountered: