Use the appropriate error function depending on the context.
For the most serious errors print a stack trace