首页 > 代码库 > 出错提示

出错提示

 try
            {
                psv.SetPlotConfigurationName(ps, cOre, null);
            }
            catch (SystemException ex)
            {
                ed.WriteMessage("\n错误行开始:");
                ed.WriteMessage("\n错误状态:" + ex.InnerException.ToString());
                ed.WriteMessage("\n异常消息:" + ex.Message.ToString());
                ed.WriteMessage("\nSource:" + ex.Source.ToString());
                ed.WriteMessage("\nStackTrace:" + ex.StackTrace.ToString());//包含出错语句和出错行
                ed.WriteMessage("\nTargetSite:" + ex.TargetSite.ToString());
                AcadApp.ShowAlertDialog("由于AutoCAD语言问题产生了错误,请将出错信息从命令行中复制并发送给程序开发人员!");
                this.Close();
                return;
            }
            catch (Autodesk.AutoCAD.Runtime.Exception exx)
            {
                ed.WriteMessage("\n错误行开始:");
                ed.WriteMessage("\n异常消息:" + exx.Message.ToString());
                ed.WriteMessage("\nSource:" + exx.Source.ToString());
                ed.WriteMessage("\nStackTrace:" + exx.StackTrace.ToString());
                AcadApp.ShowAlertDialog("由于AutoCAD语言问题产生了错误,请将出错信息从命令行中复制并发送给程序开发人员!");
                this.Close();
                return;
            }