1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/fclasses/bug30775
kgv 44b80414d3 0030775: Foundation Classes - Preserve application-defined top-level exception filter
New overload for method OSD::SetSignal() is added accepting argument specifying how to set or unset handlers.
New enum OSD_SignalMode describes different modes of signal handlers setting used in extended version of OSD::SetSignal().
Method OSD::SignalMode() returns mode set by the last call to SetSignal().
Method OSD::IsFloatingSignalSet() is changed to return value based on actual floating point exception flags (rather than on variable set by previous call to SetSignal()).

Added new method OSD::SetThreadLocalSignal() intended to setup thread-specific handlers (e.g. _set_se_translator() on Windows) and FPE settings.
OSD_ThreadPool and Media_PlayerContext now use new method instead of OSD::SetSignal(), to avoid overriding global handlers.

dsetsignal syntax has been extended to support choice of signal handling mode.

DRAW command OCC30775 is added allowing to test signal handling in multithreaded process.
2019-09-14 11:45:34 +03:00

24 lines
521 B
Plaintext

puts "================"
puts "0030775: OSD::SetSignal() within OSD_ThreadPool should not override global handlers"
puts "================"
puts ""
pload QAcommands
dsetsignal set
set IsDone [catch {set aResult [OCC30775]} result]
if { ${IsDone} != 0 } {
puts "result = ${result}"
puts "Error: command raised exception"
} else {
if { [string first "NbRaised: 100" $aResult] != -1 } {
puts "OK test case"
} else {
puts "Error: expected to have 100 raised expections"
}
}
# restore defaults
dsetsignal