summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakefeasel <jfeasel@gmail.com>2012-11-03 10:04:26 -0700
committerjakefeasel <jfeasel@gmail.com>2012-11-03 10:04:26 -0700
commit97ca2911c55a70a70bb470e8e84d418c88316f9c (patch)
treebe4cfc6409aeb2577f73ce63b55d8a5730951b3b
parent37d1b9bc11be0312d7198c565b735939e8999d2f (diff)
downloadsqlfiddle-97ca2911c55a70a70bb470e8e84d418c88316f9c.zip
sqlfiddle-97ca2911c55a70a70bb470e8e84d418c88316f9c.tar.gz
sqlfiddle-97ca2911c55a70a70bb470e8e84d418c88316f9c.tar.bz2
Showing real error message when attempts to init db fail
-rw-r--r--src/main/webapp/models/Host.cfc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/webapp/models/Host.cfc b/src/main/webapp/models/Host.cfc
index 22f9b88..a2f226c 100644
--- a/src/main/webapp/models/Host.cfc
+++ b/src/main/webapp/models/Host.cfc
@@ -22,9 +22,11 @@
<cfquery datasource="#this.cf_dsn#">#PreserveSingleQuotes(statement)#</cfquery>
</cfloop>
<cfcatch type="any">
- <cfset this.dropDatabase(arguments.databaseName)>
+ <cftry><cfset this.dropDatabase(arguments.databaseName)><cfcatch type="any"></cfcatch></cftry>
<cfif arguments.firstAttempt>
<cfset this.initializeDatabase(arguments.databaseName, false)>
+ <cfelse>
+ <cfrethrow>
</cfif>
</cfcatch>
</cftry>