Giter Club home page Giter Club logo

cd.exceptionless's Introduction

Exceptionless扩展类库

1.cd.Exceptionless.Framework Framework扩展类库,需要Framework4以上版本使用

可以通过从NuGet添加cd.Exceptionless.Framework包或者使用代码编译后使用 使用前需要在configuration节加入Key和Url

<configuration> <configSections> <section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless.Extras" /> </configSections> <appSettings> <add key="Exceptionless:ServerUrl" value="如果不是本地部署请注释"/> </appSettings> <exceptionless apiKey="Youkey" /> </configuration>

全局异常使用方法 在Program修改Main方法

static void Main()
        {
            try
            {

                //处理未捕获的异常
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常
                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(ExceptionRegister.Application_ThreadException);
                //处理非UI线程异常
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionRegister.CurrentDomain_UnhandledException);

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
            catch (Exception ex)
            {
                Information.ShowMessage(ex);
            }
        }

2.cd.Exceptionless NETCore扩展类库(支持全局异常),当前版本Net5

可以通过从NuGet添加cd.Exceptionless包直接使用,若需要低版本下载源码重新编译 使用前需要在appsettings.json节加入Key和Url

"Exceptionless": {
    "ApiKey": "Youkey",
    "ServerUrl": "如果不是本地部署请注释"
  }

注册方法: app.UseExceptionless(Configuration);

cd.exceptionless's People

Contributors

196898810 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.