[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Handle file read error
From:       wheeler () kde ! org (Scott Wheeler)
Date:       2005-03-12 1:25:01
Message-ID: 200503120126.25345.wheeler () kde ! org
[Download RAW message or body]

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>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic