![](/img/trans.png)
[英]An unhandled exception occurred during the execution of the current web request, “Не найден указанный модуль”
[英]An unhandled exception occurred during the execution
我在我的代碼中處理了如下異常,但仍然出現錯誤:
catch (Exception e)
{
throw new Exception(e.Message);
}
這是錯誤:
當前 web 請求執行期間發生未處理的異常。 請查看堆棧跟蹤以獲取有關錯誤及其源自代碼的位置的更多信息。
異常詳細信息:System.Exception:Object 引用未設置為 object 的實例。
聽起來您更像是在訪問已發布的 object/或 null object。
在 Catch 塊中,您使用以下代碼顯示異常 u r 再次拋出異常,將其刪除並重試。 希望能幫助到你。
你仍然會得到一個錯誤,因為你在 catch 塊中拋出了一個新的異常。
從一個 catch 塊中,您正在拋出一個新的異常,它正在創建一個問題嘗試刪除 throw new exception 或添加一個新的父 try catch 塊
如果您以這種方式處理您的異常(僅追溯它),則不要在此級別上捕獲異常。 在調用此 function (或您想要處理異常的地方)的方法中捕獲異常並在那里處理/顯示消息。
您可能在調用方法中沒有另一個導致未處理異常的 try/catch 塊。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.