comparison base/TempDirectory.h @ 130:b290c43f01ec

* Exceptions for file read etc
author Chris Cannam
date Wed, 28 Jun 2006 15:42:04 +0000
parents 604bd4ee3ed4
children 82f529a08cf3
comparison
equal deleted inserted replaced
129:4e38a29c13fc 130:b290c43f01ec
35 public: 35 public:
36 static TempDirectory *instance(); 36 static TempDirectory *instance();
37 37
38 virtual ~TempDirectory(); 38 virtual ~TempDirectory();
39 39
40 class DirectoryCreationFailed : virtual public std::exception
41 {
42 public:
43 DirectoryCreationFailed(QString directory) throw();
44 virtual DirectoryCreationFailed::~DirectoryCreationFailed() throw() { }
45 virtual const char *what() const throw();
46
47 protected:
48 QString m_directory;
49 };
50
51 /** 40 /**
52 * Create the root temporary directory if necessary, and return 41 * Create the root temporary directory if necessary, and return
53 * its path. Throw DirectoryCreationFailed if the directory 42 * its path. Throw DirectoryCreationFailed if the directory
54 * cannot be created. 43 * cannot be created.
55 */ 44 */