Is there a location that lists all the API functions available, as I cannot find print_error listed anywhere.
Thanks
I know this doesn't answer your specific question, but that function is defined in setuplib.php on line 462, at least in Moodle 2.7.7+ it is. It actually has 5 arguments
I think you probably have answered the question - if you look at:
https://github.com/moodle/moodle/blob/master/lib/setuplib.php#L449
the PHPDoc comment explains exactly what all the params mean.