diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2017-03-11 15:03:17 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2017-03-14 13:22:57 +0300 |
commit | 8dd0355c212b14fd4cf375ce3a90f3d669fb182b (patch) | |
tree | ac764505b093420fda0f775ab7fc91c1370ec4bb /intern/cycles/device/device.h | |
parent | 0ee1cdab7e5896d56c7c6d9681a427e386fa2ae9 (diff) |
Cycles: Try to avoid infinite loops by catching invalid ray states
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 18e8e274172..ec15a254f81 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -228,6 +228,14 @@ public: DeviceInfo info; virtual const string& error_message() { return error_msg; } bool have_error() { return !error_message().empty(); } + virtual void set_error(const string& error) + { + if(!have_error()) { + error_msg = error; + } + fprintf(stderr, "%s\n", error.c_str()); + fflush(stderr); + } virtual bool show_samples() const { return false; } /* statistics */ |