Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E249EC69 for ; Mon, 18 Mar 2013 09:24:18 +0000 (UTC) Received: (qmail 43612 invoked by uid 500); 18 Mar 2013 09:24:17 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 43466 invoked by uid 500); 18 Mar 2013 09:24:17 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 43113 invoked by uid 99); 18 Mar 2013 09:24:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 09:24:15 +0000 Date: Mon, 18 Mar 2013 09:24:14 +0000 (UTC) From: "Michal Fojtik (JIRA)" To: dev@deltacloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DTACLOUD-515) Make CIMI schema errors nicer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Michal Fojtik created DTACLOUD-515: -------------------------------------- Summary: Make CIMI schema errors nicer Key: DTACLOUD-515 URL: https://issues.apache.org/jira/browse/DTACLOUD-515 Project: DeltaCloud Issue Type: Improvement Components: CIMI/Frontend Reporter: Michal Fojtik Priority: Minor It is sometimes very difficult to debug/investigate the CIMI schema errors like this: E, [2013-03-15T22:38:41.085818 #15400] ERROR -- 500: [NoMethodError] undefined method `[]' for nil:NilClass d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:285:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `each' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:150:in `convert_to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:127:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `each' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:150:in `convert_to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `map' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `each' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:150:in `convert_to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `map' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:256:in `to_xml' d:/sources/OSS/cloud/deltacloud/server/lib/cimi/models/schema.rb:390:in `to_xml' 127.0.0.1 - - [15/Mar/2013 22:38:41] "GET /cimi/system_templates?format=xml HTTP/1.1" 500 118321 58.3752 My idea is to provide more nice errors to developers so it will be easier to figure out what is wrong. In this case, it would help to print what attribute in the SystemTemplate schema errors out, like: [CIMISchemaError] The SystemTemplate#properties attribute value must be a Hash [CIMISchemaError] The SystemTemplate#machine_template attribute value must be a Reference to MachineTemplate etc. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira