On null pointer arg, better to crash or throw exception?

Posted by paz on Stack Overflow See other posts from Stack Overflow or by paz
Published on 2010-05-29T03:39:13Z Indexed on 2010/05/29 3:42 UTC
Read the original article Hit count: 297

Filed under:
|

What is the preferred way to handle a null pointer passed in as an output argument to a function? I could ASSERT but I feel like its not good to let a library crash the program. Instead, I was thinking about using exceptions.

© Stack Overflow or respective owner

Related posts about c++

Related posts about exception-handling