From 03d32783ea021b5ae8e744f094af90197294327a Mon Sep 17 00:00:00 2001 From: eddyg Date: Mon, 27 Aug 2007 01:55:10 +0000 Subject: Added rudimentory error handling to HB. Instead of using hb_log() use hb_error(). Also causes us to stop muxing when we get a write error in MP4 and MKV containers. Still requires macosx dialog box by dynaflash (see main.mm for stub to use). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@869 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/main.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'macosx/main.mm') diff --git a/macosx/main.mm b/macosx/main.mm index b07c7f1c8..7880214f9 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -11,6 +11,19 @@ void SigHandler( int signal ) [NSApp terminate: NULL]; } +/**************************************************************************** + * hb_error_handler + * + * Change this to display a dialog box - and maybe move it somewhere else, + * this is the only place I could find that looked like C :) +****************************************************************************/ +extern "C" { +void hb_error_handler( const char *errmsg ) +{ + fprintf(stderr, "ERROR: %s\n", errmsg ); +} +} + int main( int argc, const char ** argv ) { signal( SIGINT, SigHandler ); -- cgit v1.2.3