Fix #4273, print error in create_session

Fix #4273
bug/bundler_fix
wchen-r7 2015-11-16 17:17:20 -06:00
parent f0da09090d
commit a78fa7c3d9
1 changed files with 8 additions and 1 deletions

View File

@ -189,7 +189,14 @@ protected
# If the payload we merged in with has an associated session factory,
# allocate a new session.
if (self.session)
s = self.session.new(conn, opts)
begin
s = self.session.new(conn, opts)
rescue ::Exception => e
# We just wanna show and log the error, not trying to swallow it.
print_error("#{e.class} #{e.message}")
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}")
raise e
end
# Pass along the framework context
s.framework = framework