Mercurial > hg > vamp-plugin-load-checker
comparison src/helper.cpp @ 50:5f91094e5680
Ensure runtime_error is declared
author | Chris Cannam |
---|---|
date | Thu, 11 Oct 2018 15:55:17 +0100 |
parents | 51a8fe0a03cf |
children | dd193244d97d |
comparison
equal
deleted
inserted
replaced
49:51a8fe0a03cf | 50:5f91094e5680 |
---|---|
88 | 88 |
89 #include <fcntl.h> | 89 #include <fcntl.h> |
90 | 90 |
91 #include <string> | 91 #include <string> |
92 #include <iostream> | 92 #include <iostream> |
93 #include <stdexcept> | |
93 | 94 |
94 #ifdef _WIN32 | 95 #ifdef _WIN32 |
95 #ifndef UNICODE | 96 #ifndef UNICODE |
96 #error "This must be compiled with UNICODE defined" | 97 #error "This must be compiled with UNICODE defined" |
97 #endif | 98 #endif |
295 normalFd = dup(1); | 296 normalFd = dup(1); |
296 suspendedFd = open("/dev/null", O_WRONLY); | 297 suspendedFd = open("/dev/null", O_WRONLY); |
297 #endif | 298 #endif |
298 | 299 |
299 if (normalFd < 0 || suspendedFd < 0) { | 300 if (normalFd < 0 || suspendedFd < 0) { |
300 throw runtime_error("Failed to initialise fds for stdio suspend/resume"); | 301 throw std::runtime_error |
302 ("Failed to initialise fds for stdio suspend/resume"); | |
301 } | 303 } |
302 } | 304 } |
303 | 305 |
304 static void suspendOutput() | 306 static void suspendOutput() |
305 { | 307 { |