After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635359 - Throw an exception when failing to look up a foreign struct
Throw an exception when failing to look up a foreign struct
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-20 17:28 UTC by Owen Taylor
Modified: 2010-12-06 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Throw an exception when failing to look up a foreign struct (2.41 KB, patch)
2010-11-20 17:28 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-11-20 17:28:47 UTC
Returning failure without setting an exception was causing control
to mysteriously jump out of the enclosing function. The function
is also changed to g_assert() rather than returning NULL when
a non-interface GITypeInfo is passed in - it's a case that should
not happen if the calling code is correct so throwing an exception
doesn't make sense.
Comment 1 Owen Taylor 2010-11-20 17:28:50 UTC
Created attachment 174916 [details] [review]
Throw an exception when failing to look up a foreign struct
Comment 2 Colin Walters 2010-12-06 15:03:14 UTC
Review of attachment 174916 [details] [review]:

Looks right.
Comment 3 Colin Walters 2010-12-06 15:14:38 UTC
Attachment 174916 [details] pushed as d4103f4 - Throw an exception when failing to look up a foreign struct