Skip to content

Fixed crashing when importing data with a different than expected type #243

wants to merge 1 commit into from

3 participants

mkarp commented Sep 5, 2012


Started using MagicalImport on a new project and run into an error: when importing data with another type than it is expected in the entity's setter an exception is thrown - for example, if you put NSNumber into - (void)setTitle:(NSString *)title. It would be good to check such kind of errors when importing data from REST API. Changing the data type on the server side would crash the whole app.

I've added try-catch block on setting KVC value. I doubt that it is the best implementation regarding performance issues but it solves the problem.

Would like to hear your thoughts on this.

Thank you.

Magical Panda Software member

As soon as we get a test for this I can merge.
I'm also leery to do try/catch, but don't have another foolproof solution

@blackgold9 blackgold9 was assigned Sep 23, 2012
mkarp commented Sep 23, 2012
Magical Panda Software member

Yes. Are you willing to do it?

@blackgold9 blackgold9 closed this Sep 27, 2012
@blackgold9 blackgold9 reopened this Sep 27, 2012
Magical Panda Software member



Closing due to lack of activity. Please feel free to re-open this issue if it’s still relevant, or if you can give me some guidance on writing a test to ensure the function of this change.

@tonyarnold tonyarnold closed this Aug 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.