[Libreoffice] uno discoverability

Michael Meeks michael.meeks at suse.com
Wed Nov 16 02:25:06 PST 2011


On Tue, 2011-11-15 at 20:34 +0100, Michael Stahl wrote:
> > com.sun.star.uno.RuntimeException:
> >
> >  >>>

	Presumably python is showing you the message embedded in the exception
(which is empty ?) or do we miss even that ?

> in a lot of UNO API implementations the only form of error reporting 
> used is "throw RuntimeException;", which leaves (as you correctly note) 
> a lot to be desired in terms of usability for the hapless API user.

	Quite :-)

> this definitely ought to be an easy hack, as putting a more helpful 
> error message in there can really be done by anyone: patches welcome.

	IMHO we need to make that code efficient by having a var-args style
helper:

	throw FooException("Failure loading file '%S' code %d",
			   aOUStr.pData, nCode);

	That would also be fairly code size efficient as well vs. the
heavy-lifting, and big string-buffer construction madness :-)

On Tue, 2011-11-15 at 20:09 +0100, Michael Stahl wrote:
> but AFAIK currently the extensive API documentation that is in the
> IDL files is only available on the web; it ought to be possible to
> store that in the rdb files somehow and then have some thingy in UNO
> that allows programmatic access, so things like help in python can
> extract it?  hmm... maybe there's an easy-hack somewhere in there...

	Certainly rather an 'advanced' easy hack but worth doing :-) I would be
-extremely- skeptical of putting more data into types.rdb though - that
is still using the hideous 'store' code that everyone should be eager to
see the back of, and which wastes space and I/O left and right like
nobody's business :-) Even after some work to shrink that we have
(commas added to size for effect):

-rw-r--r-- 1 michael users 10,649,600 Nov 11 20:44 offapi.rdb
-rw-r--r-- 1 michael users 13,647,356 Nov 16 10:21 offapi.rdb.regview-output
-rw-r--r-- 1 michael users  1,834,902 Nov 11 20:44 offapi.rdb.gz
-rw-r--r-- 1 michael users  1,375,023 Nov 16 10:21 offapi.rdb.regview-output.gz

	It'd be great to use a more pleasant format like Stephan's new configmr
XML - if we can get the performance we need there; and of course add the
API docs to some parallel docs file, only loaded when needed
(interactively by developers). But of course it's a good idea.

	ATB,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list