Legacy error handling tends to follow the method that all functions return a code depending on success/failure. You would check this code and handle (if an error) appropriately
Status codes are typically better than exceptions in cases where they represent cases that a function's immediate calling code is prepared to handle. The problem with status codes is that if the immediate calling code doesn't handle them, it's likely nothing will. If code throws an exception and the immediate calling code isn't prepared to handle it, the exception will propagate to code which at least claims to be so prepared.