13
0

Allow local-scope strings to be passed in as constructor parameters.

git-svn-id: svn://localhost/ardour2/branches/3.0@7559 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-08-07 23:30:12 +00:00
parent 54d019cdd6
commit 66aeda8d8a

View File

@ -135,13 +135,15 @@ class AudioEngine : public SessionHandlePtr
class PortRegistrationFailure : public std::exception {
public:
PortRegistrationFailure (const char* why = "") {
reason = why;
}
virtual const char *what() const throw() { return reason; }
PortRegistrationFailure (std::string const & why = "")
: reason (why) {}
~PortRegistrationFailure () throw () {}
virtual const char *what() const throw () { return reason.c_str(); }
private:
const char* reason;
std::string reason;
};
class NoBackendAvailable : public std::exception {