This fixes error handling for BeOS, removing the need for some ifdefs.