seed r103 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r103 - trunk/libseed
- Date: Tue, 4 Nov 2008 07:24:43 +0000 (UTC)
Author: racarr
Date: Tue Nov 4 07:24:43 2008
New Revision: 103
URL: http://svn.gnome.org/viewvc/seed?rev=103&view=rev
Log:
Seed.import_namespace should throw an exception if it gets 0 arguments.
Modified:
trunk/libseed/seed-engine.c
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Tue Nov 4 07:24:43 2008
@@ -534,6 +534,15 @@
JSStringRef extension_script;
int n, i;
+ if (argumentCount == 0)
+ {
+ seed_make_exception(exception,
+ "ArgumentError",
+ "Seed.import_namespace"
+ " expected 1 or 2 arguments, got 0");
+ return JSValueMakeNull(eng->context);
+ }
+
namespace = seed_value_to_string(arguments[0]);
if (argumentCount == 2) {
version = seed_value_to_string(arguments[1]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]