> 
> **Possible Duplicate:**  
> 
> [design by contract tests by assert or by exception?](https://stackoverflow.com/questions/117171/design-by-contract-tests-by-assert-or-by-exception) 
> 
> 
> 

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.