Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception localization problem #19

Closed
tcurdt opened this issue May 6, 2014 · 3 comments
Closed

exception localization problem #19

tcurdt opened this issue May 6, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@tcurdt
Copy link

tcurdt commented May 6, 2014

The key error_exception_%@ cannot be found, that causes the format to be nil and gives another exception overshadowing the original one.

https://github.com/b52/OMPromises/blob/master/Classes/Core/OMResources.m#L67

Frankly speaking I don't understand how though. Quoting from the docs

A localized version of the string designated by key in table tableName. If value is nil or an empty string, and a localized string is not found in the table, returns key. If key and value are both nil, returns the empty string.

Yet I see

(lldb) po key
error_exception_%@

(lldb) po format
 nil

Any idea? Maybe just add a safe guard?

@aomader
Copy link
Owner

aomader commented May 6, 2014

It might be possible that OMLocalizedStrings() did not return an NSBundle, in which case the method called on it would also return nil, although key is not nil.
That shouldn't lead to an exception, though!

I'll write a fix and let you know when it's done.

@aomader aomader added the bug label May 6, 2014
@aomader aomader self-assigned this May 6, 2014
@aomader aomader added this to the 0.4.0 milestone May 6, 2014
@aomader
Copy link
Owner

aomader commented May 6, 2014

Should be fixed now.

@aomader aomader closed this as completed May 6, 2014
@tcurdt
Copy link
Author

tcurdt commented May 6, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants