Code Monkey home page Code Monkey logo

baseexception's Introduction

BaseException

适用于C++异常捕获的一个实现方法。里面包含两部分,捕捉异常堆栈信息StackWalk和输出log,两部分都源自git,经过整合,完成了将异常堆栈信息输出到log的目的。

使用场景

可用于开发软件中,收集定位异常位置。不需要每个错误都要完整复现。

使用方法

参考example.cpp。其中 Logger g_logger("log.txt"); 在BaseException.cpp中也有使用,如果需要更改变量名,需要同步更改。更多关于两个库的使用方法请参照https://github.com/bmoscon/Logger missing。

注意事项

在VS中使用,可能需要设置以下几个选项。 "C/C++" - "常规" - "调试信息格式" - "程序数据库" "C/C++" - "优化" - "优化" - "已禁用 (/Od)" "链接器" - "调试" - "生成调试信息" - "生成调试信息 (/DEBUG)"

// 工程使用unicode编码,或者需要自行解决convert2string.h中的错误。

baseexception's People

Contributors

xiaonuo911teamo avatar

Stargazers

 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.