https://issues.apache.org/ooo/show_bug.cgi?id=118896

             Bug #: 118896
        Issue Type: DEFECT
           Summary: BASIC needs a throwRuntimeException() function
    Classification: Code
           Product: scripting
           Version: version58
          Platform: All
        OS/Version: All
            Status: CONFIRMED
          Severity: enhancement
          Priority: P3
         Component: code
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


There are some things that can only be done by throwing an exception.

For example, Page 13 of
http://www.openoffice.org/documentation/HOW_TO/various_topics/VbaStarBasicXref.pdf,
addressing the differences between VBA and OOo BASIC happily states that "To
cancel the close in OOo, you must
register a listener for the close event and then veto the close."

But at
http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/XCloseListener.html
we read that to veto the close the listener has to throw a closeVetoException.
Which BASIC can't do. So you have to jump through a lot of hoops, register a
dispatch interceptor, crash the application if you get it wrong, etc.

Something like throwRuntimeException("com.sun.star.util.CloseVetoException")
would make life easier.

-- 
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to