> 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?
Nope sorry, after second review I couldn't find exactly this case in hbcairo, which means it looks fine. (CAIRO_PATH_ITERATOR_CREATE() looked wrong at first glance) Parameter checks and RTEs seem all in place, so all that needs to be done is fall back to return failure where cairo functions don't exist in the cairo version hbcairo is build against. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
