Re: JVM access violation in Type Browser
Roger I Martin PhD <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Morten Andersen wrote:
> Hi Roger
>
> Roger I Martin PhD wrote:
>
>> I do think it would be good if I went thru the typelib native code I
>> wrote and apply exception handling I learned from Robert...
>
>
> Will this make any sense for Jawin itself too? I have been thinking
> about the very simple wrapping of all JNI entry points in the native
> code like:
>
> try {
>
> } catch (...) {
> // "..." catches everything
> // raise java-runtime error and return
>
> }
>
> This should (hopefully) lead to Jawin never crashing the JVM. But if
> your and Roberts exception handling schema is more "fine granular" it
> may suit Jawin better. And perhaps it can also be dangerous to catch and
> continue after eg. an access violation?, but since we will make it throw
> a runtime error it least leaves the user of Jawin to decide what to do
> with these errors (eg. catch and continue or let the JVM abort), today
> he doesn't have any chance on a native unhandled exception.
>
> Best Regards
> Morten
>
Very much like that. For
http://cvs.sourceforge.net/viewcvs.py/jawinproject/jawin/cpp/TypeLibWrapper/org_jawin_win32_ITypeInfo.cpp?rev=1.1&only_with_tag=MAIN&view=markup
most need just coarse granularity. For jawin marhsaling we may want
fine granularity. But maybe after refactoring marshaling? Applying
java.nio package?
Best Regards,
Roger