try
{
..........................
//.........................
}
catch(Exception ee)
{
//出错的信息
ee.Message;
}
{
..........................
//.........................
}
catch(Exception ee)
{
//出错的信息
ee.Message;
}
解决方案 »
- [求助] DbDataAdapter.FillSchema(DataTable, SchemaType)方法出错
- 如何得到pictureBox1控件的图片路径和名称?
- 加急帖!C#连接数据库查询的问题!
- 我的TFS服务器: TFS、VS 2005、SQL Server 2005
- 求C#类似界面皮肤的解决方案
- 各位帮帮忙 !
- rdlc报表设计程序,能单独安装吗?
- 如何在打包应用程序时在桌面放可执行程序的快捷方式
- 请教 zhaixd():
- 不知道CL333+128M的配置能不能跑VS.net?
- socket中文件传输问题。急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!
- 征集国内外最优秀的C#技术网站
protected void Page_Error(object sender, System.EventArgs e)
{
string errMsg;
Exception currentError = Server.GetLastError(); errMsg = "<link rel=\"stylesheet\" href=\"/ThePhile/Styles/ThePhile.CSS\">";
errMsg += "<h1>Page Error</h1><hr/>An unexpected error has occurred on this page. The system " +
"administrators have been notified. Please feel free to contact us with the information " +
"surrounding this error.<br/>"+
"The error occurred in: "+Request.Url.ToString()+"<br/>"+
"Error Message: <font class=\"ErrorMessage\">"+ currentError.Message.ToString() + "</font><hr/>"+
"<b>Stack Trace:</b><br/>"+
currentError.ToString();
//也可以把错误写进文件,或系统日志等
Response.Write( errMsg );
Server.ClearError();
}
{
..........................
}
catch(Exception ee)
{
//出错的信息
writefile("c:\a.txt",ee.Message);//自己 写一个存文件的方法,把错误写进日志
}