deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DTACLOUD-515) Make CIMI schema errors nicer
Date Mon, 18 Mar 2013 09:24:14 GMT
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

Mime
View raw message