diff base/Exceptions.cpp @ 387:7aa1de571880

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents b290c43f01ec
children 65d955c4d671
line wrap: on
line diff
--- a/base/Exceptions.cpp	Sat Mar 01 16:17:44 2008 +0000
+++ b/base/Exceptions.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -107,3 +107,18 @@
         .arg(m_directory).arg(m_required).arg(m_available).toLocal8Bit().data();
 }
 
+AllocationFailed::AllocationFailed(QString purpose) throw() :
+    m_purpose(purpose)
+{
+    std::cerr << "ERROR: Allocation failed: " << purpose.toStdString()
+              << std::endl;
+}
+
+const char *
+AllocationFailed::what() const throw()
+{
+    return QString("Allocation failed: %1")
+        .arg(m_purpose).toLocal8Bit().data();
+}
+
+