Handle file read error

Scott Wheeler wheeler at kde.org
Sat Mar 12 01:26:25 CET 2005


On Wednesday 02 March 2005 21:54, paul-henri.ferme wrote:
> I was trying to handle the errot triggered by a user trying to write to
> a musical file (ogg in my case) located on a read only file system.
>
> At the moment taglib will dump a debug message (unless NDEBUG is
> defined)  to std::cerr. This probably won't be noticed  unless running
> from a console.
>
> Is there a way to catch this error and  pop-up a warning message window ?

As of TagLib 1.3 File::save() returns a bool, so you could check for that.  If 
you want more detailed information you could first use File::isWritable() to 
check before saving.

-Scott

-- 
diff -u life.cpp~ life.cpp
--- life.cpp~   2002/03/19 07:44:28
+++ life.cpp   2002/04/09 15:49:39
-#include <sleep.h>
+#include <caffeine.h>


More information about the taglib-devel mailing list