Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Friendly error messages from SQL/XSLT Functions, when database connection fails

$
0
0

Is there a way to get friendly error messages, of my own writing, back from SQL/XSLT functions, instead of:

[ Error ]

.... or the worse:

<divclass="c1errordetails"style="border: 2px solid red; padding: 2px 6px 2px 6px; background-color: InfoBackground; color: InfoText; -moz-border-radius: 4px; -moz-box-shadow: 1px 1px 3px 0 rgba(0,0,0,0.75);"><strong>Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</strong><div>C1 Function: BSU.Display.UndergraduateSubjectStudyOptions</div><divstyle="font-size: 0.7em">Error details:
		<divstyle="padding-left: 10px;"title="xx">One or more errors occurred.
			<divstyle="padding-left: 10px;"title="xx">Failed to execute function with local name 'SQLUndergraduateSubjectStudyOptions'
				<divstyle="padding-left: 10px;"title="xx">Failed to get value for function 'BSU.Courses.SQLUndergraduateSubjectStudyOptions'
					<divstyle="padding-left: 10px;"title="xx">A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</div></div></div></div></div></div>

?

I'd like to have something nice in place, in case of a firewall change within our network or a connection string failure.


Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>