mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-02 08:58:43 +03:00
QIDISlicer1.0.0
This commit is contained in:
20
src/libslic3r/TryCatchSignal.hpp
Normal file
20
src/libslic3r/TryCatchSignal.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef TRY_CATCH_SIGNAL_HPP
|
||||
#define TRY_CATCH_SIGNAL_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "TryCatchSignalSEH.hpp"
|
||||
#else
|
||||
|
||||
#include <csignal>
|
||||
|
||||
using SignalT = decltype (SIGSEGV);
|
||||
|
||||
template<class TryFn, class CatchFn, int N>
|
||||
void try_catch_signal(const SignalT (&/*sigs*/)[N], TryFn &&fn, CatchFn &&/*cfn*/)
|
||||
{
|
||||
fn();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // TRY_CATCH_SIGNAL_HPP
|
||||
|
||||
Reference in New Issue
Block a user