You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Dies Koper (JIRA)" <ji...@apache.org> on 2012/11/09 12:44:12 UTC
[jira] [Created] (DTACLOUD-360) console does not print "Blah" when
safely { raise "Blah" }, then capture that by exceptions {}
Dies Koper created DTACLOUD-360:
-----------------------------------
Summary: console does not print "Blah" when safely { raise "Blah" }, then capture that by exceptions {}
Key: DTACLOUD-360
URL: https://issues.apache.org/jira/browse/DTACLOUD-360
Project: DeltaCloud
Issue Type: Bug
Components: Server
Environment: Win 7
Reporter: Dies Koper
All it logs to the console is the return code, like an access log entry, but not the exception message. It used to print the message too.
--
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
[jira] [Commented] (DTACLOUD-360) console does not print "Blah"
when safely { raise "Blah" }, then capture that by exceptions {}
Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DTACLOUD-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503181#comment-13503181 ]
Dies Koper commented on DTACLOUD-360:
-------------------------------------
I can reproduce this with your code. It seems to depend in which method the error is raised.
I've confirmed I get what I reported when I move your code into fgcp's "def addresses" method.
Also, with the case above, in the console where I ran curl I get a very long trace. Is that intended?
> console does not print "Blah" when safely { raise "Blah" }, then capture that by exceptions {}
> ----------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-360
> URL: https://issues.apache.org/jira/browse/DTACLOUD-360
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Win 7
> Reporter: Dies Koper
> Assignee: Michal Fojtik
>
> All it logs to the console is the return code, like an access log entry, but not the exception message. It used to print the message too.
--
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
[jira] [Commented] (DTACLOUD-360) console does not print "Blah"
when safely { raise "Blah" }, then capture that by exceptions {}
Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DTACLOUD-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502764#comment-13502764 ]
Michal Fojtik commented on DTACLOUD-360:
----------------------------------------
So I did a quick testing:
This is what I have in mock driver:
def realms(credentials, opts={})
...
safely do
# This hack is used to test if client capture exceptions correctly
# To raise an exception do GET /api/realms/50[0-2]
raise "DeltacloudErrorTest" if opts and opts[:id] == "500"
end
...
end
on /DeltacloudErrorTest/ do
status 500
#message "DeltacloudErrorMessage" => This will overide the exception message (I disabled that)
end
Then I did: curl -x GET --user 'mockuser:mockpassword' 'http://localhost:3001/api/realms/500'
This is what I can see in the console:
127.0.0.1 - - [22/Nov/2012 14:16:59] "GET /api/realms/500 HTTP/1.1" 500 696355 0.3380
E, [2012-11-22T14:17:00.449709 #12424] ERROR -- 500: [Deltacloud::Exceptions::BackendError] DeltacloudErrorTest
/home/mfojtik/code/core/server/lib/deltacloud/drivers/mock/mock_driver.rb:104:in `realms'
/home/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:212:in `call'
/home/mfojtik/code/core/server/lib/deltacloud/drivers/exceptions.rb:212:in `safely'
/home/mfojtik/code/core/server/lib/deltacloud/drivers/mock/mock_driver.rb:101:in `realms'
/home/mfojtik/code/core/server/lib/deltacloud/drivers/base_driver.rb:218:in `realm'
/home/mfojtik/code/core/server/lib/deltacloud/helpers/deltacloud_helper.rb:69:in `send'
/home/mfojtik/code/core/server/lib/deltacloud/helpers/deltacloud_helper.rb:69:in `show'
/home/mfojtik/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/benchmark.rb:293:in `measure'
/home/mfojtik/code/core/server/lib/deltacloud/helpers/deltacloud_helper.rb:68:in `show'
/home/mfojtik/code/core/server/lib/deltacloud/helpers/rabbit_helper.rb:29:in `standard_show_operation'
/home/mfojtik/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/sinatra-rabbit-1.1.2/lib/sinatra/rabbit/base.rb:394:in `instance_eval'
The 'DeltacloudErrorTest' is the original message I used in 'raise'.
> console does not print "Blah" when safely { raise "Blah" }, then capture that by exceptions {}
> ----------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-360
> URL: https://issues.apache.org/jira/browse/DTACLOUD-360
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Win 7
> Reporter: Dies Koper
> Assignee: Michal Fojtik
>
> All it logs to the console is the return code, like an access log entry, but not the exception message. It used to print the message too.
--
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
[jira] [Assigned] (DTACLOUD-360) console does not print "Blah" when
safely { raise "Blah" }, then capture that by exceptions {}
Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DTACLOUD-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michal Fojtik reassigned DTACLOUD-360:
--------------------------------------
Assignee: Michal Fojtik
> console does not print "Blah" when safely { raise "Blah" }, then capture that by exceptions {}
> ----------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-360
> URL: https://issues.apache.org/jira/browse/DTACLOUD-360
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Win 7
> Reporter: Dies Koper
> Assignee: Michal Fojtik
>
> All it logs to the console is the return code, like an access log entry, but not the exception message. It used to print the message too.
--
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
[jira] [Commented] (DTACLOUD-360) console does not print "Blah"
when safely { raise "Blah" }, then capture that by exceptions {}
Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DTACLOUD-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493995#comment-13493995 ]
Michal Fojtik commented on DTACLOUD-360:
----------------------------------------
Thanks for reporting this. Sounds like a small bug in our exception system. Will investigate.
> console does not print "Blah" when safely { raise "Blah" }, then capture that by exceptions {}
> ----------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-360
> URL: https://issues.apache.org/jira/browse/DTACLOUD-360
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Win 7
> Reporter: Dies Koper
> Assignee: Michal Fojtik
>
> All it logs to the console is the return code, like an access log entry, but not the exception message. It used to print the message too.
--
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