core: Get rid of ItemCreatorError
authorJens Georg <mail@jensge.org>
Mon, 20 Feb 2012 13:05:53 +0000 (15:05 +0200)
committerJens Georg <mail@jensge.org>
Tue, 21 Feb 2012 13:41:44 +0000 (15:41 +0200)
src/rygel/rygel-item-creator.vala
tests/rygel-item-creator-test.vala

index 879d2a9..38c7938 100644 (file)
 using GUPnP;
 using Gst;
 
-private errordomain Rygel.ItemCreatorError {
-    PARSE
-}
-
 /**
  * CreateObject action implementation.
  */
@@ -143,7 +139,8 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
         if (this.didl_item == null) {
             var message = _("No items in DIDL-Lite from client: '%s'");
 
-            throw new ItemCreatorError.PARSE (message, this.elements);
+            throw new ContentDirectoryError.BAD_METADATA
+                                        (message, this.elements);
         }
 
         if (didl_item.id == null || didl_item.id != "") {
index aa5ec0c..5fd5f0e 100644 (file)
@@ -316,7 +316,7 @@ public class Rygel.HTTPItemCreatorTest : GLib.Object {
         // test empty DIDL
         item_node->unlink ();
         didl_node->set_content ("  ");
-        this.test_didl_parsing_step (xml, 701);
+        this.test_didl_parsing_step (xml, bad_metadata.code);
 
         // test item node with missing restricted attribute
         var tmp = item_node->copy (1);