Hi,

Viktor Szakáts wrote:
Current hbcairo code uses RTE _right on creation_, which is IMO not ideal solution, as it's more difficult to handle it on .prg level.

So as a general advice, IMO RTE should only be thrown if wrong parameter was passed to a function, so code snippet like this one can be made sure to not RTE because of problems downstream in calls.

IF ! Empty( p := MYOBJECT_CREATE( "hello" ) )
    MYOBJECT_DO_SOMETHING_USEFUL( p, 100 )
ELSE
/* Either the low-level call failed, or low-level call was not available.
       Handle it gracefully. */
ENDIF

In current implementation whole above construct needs to be put inside BEGIN SEQUENCE to prepare for MYOBJECT_CREATE() failures.


Do you have any sample code that shows the above hbcairo behavior?


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to