Forum C# Misleading documentation - DatabaseObject Get*

Misleading documentation - DatabaseObject Get*

Postby sebas77 » July 29th, 2013, 3:43 pm

public int
GetInt (string propertyExpression, int defaultValue)
Get the given int property, falling back to the given default value if the int property does not exist

the bold sentence is not true, the function instead throw an exception

btw, is there a way to log the exceptions on production server?
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Misleading documentation - DatabaseObject Get*

Postby Henrik » July 29th, 2013, 5:39 pm

What exception did you get?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Misleading documentation - DatabaseObject Get*

Postby sebas77 » July 29th, 2013, 5:45 pm

I think the normal behaviour is to get the exception, in fact in the doc file:

http://playerio.com/documentation/refer ... baseobject

you write:

If you try to get a property that is missing, or if you are using a get method of the wrong type, you will get an exception.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm


Return to C#



cron