seed r220 - in trunk: libseed tests
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r220 - in trunk: libseed tests
- Date: Sun, 9 Nov 2008 07:51:31 +0000 (UTC)
Author: racarr
Date: Sun Nov 9 07:51:31 2008
New Revision: 220
URL: http://svn.gnome.org/viewvc/seed?rev=220&view=rev
Log:
Make namespace import use the exception from errors from girepository.
Modified:
trunk/libseed/seed-engine.c
trunk/tests/namespace-exception-test.js
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Sun Nov 9 07:51:31 2008
@@ -668,18 +668,7 @@
if (!g_irepository_require(g_irepository_get_default(), namespace,
version, 0, &e))
{
- gchar *mes;
- if (!version)
- {
- mes = g_strdup_printf("No such namespace: %s", namespace);
- }
- else
- {
- mes =
- g_strdup_printf
- ("No such namespace: %s (version %s)", namespace, version);
- }
- seed_make_exception(exception, "NamespaceError", mes);
+ seed_make_exception_from_gerror(exception, e);
return JSValueMakeNull(eng->context);
}
Modified: trunk/tests/namespace-exception-test.js
==============================================================================
--- trunk/tests/namespace-exception-test.js (original)
+++ trunk/tests/namespace-exception-test.js Sun Nov 9 07:51:31 2008
@@ -1,6 +1,10 @@
#!/usr/bin/env seed
// Returns: 0
// STDIN:
+// STDOUT:Typelib file for namespace 'CoreAnimation' \(any version\) not found\nTypelib file for namespace 'Gtk', version '3\.0' not found
+// STDERR:
+// Returns: 0
+// STDIN:
// STDOUT:No such namespace: CoreAnimation\nNo such namespace: Gtk \(version 3\.0\)
// STDERR:
try
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]