In reply to mayurkubavat:
You should always use an if condition to check the status of a method call. Never use an assert statement as it can be disabled resulting in undesired behavior. Refer to this page for more information.
In reply to mayurkubavat:
You should always use an if condition to check the status of a method call. Never use an assert statement as it can be disabled resulting in undesired behavior. Refer to this page for more information.