Using NSNumber properties (unsupported) now throws a more informative exception

Shouldn't we mention the ones supported? It's not clear from the reduced
text that we don't support NSUInteger or unsigned int etc.
Alternatively we could have the existing text and refer to the doc for the
supported types.


On Thu, Jul 24, 2014 at 6:19 AM, JP Simard <notifications@github.com> wrote:

> In Realm/RLMProperty.m:
>
> > @@ -151,6 +151,11 @@ -(BOOL)parsePropertyTypeString:(const char *)code {
> >                                                   userInfo:nil];
> >                  }
> >              }
> > +            else if ([type isEqualToString:@"@\"NSNumber\""]) {
> > +                @throw [NSException exceptionWithName:@"RLMException"
> > +                                               reason:[NSString stringWithFormat:@"'NSNumber' cannot be used as an RLMObject property. Instead, please use one of NSInteger, int, long, Int (Swift), BOOL, bool, Bool (Swift), CGFloat, float, Float (Swift), CGFloat, double, Double (Swift)"]
>
> Updated.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/realm/realm-cocoa/pull/662/files#r15329309>.
>