Menu

#24 Catch exceptions in main()?

open
nobody
None
5
2015-10-14
2015-10-13
No

I expect that exception handling is usually supported by a C++ program. I wonder why your function "main" does not contain corresponding try and catch instructions so far.

How do you think about recommendations by Matthew Wilson in an article?

Would you like to adjust the implementation if you consider effects for uncaught/unhandled exceptions like they are described by Danny Kalev?

Discussion

  • Ulya Trofimovich

    Thank you for the articles.

    Different developers have different opinions about C++ exceptions: some find them very handy, others prefer to check return codes (me included). I try to make re2c codebase as simple as possible: you won't find complex object hierarchies or virtual functions (I'm refering to branch 'simplified_codegen'). re2c's coding style is somewhat C-like C++.

    I don't mean to say that all error codes are checked as they should be, or the C++ exceptions are evil. Just that it's more a matter of taste. re2c has much more complex and urgent problems to solve. :)

     
  • Ulya Trofimovich

    • status: open --> closed
     
    • Markus Elfring

      Markus Elfring - 2015-10-14

      Should this issue be kept open until the affected implementation details will be fixed?

       
  • Ulya Trofimovich

    Ok, lets keep it open as a reminder. :)

     
  • Ulya Trofimovich

    • status: closed --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.