kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Fix printing of errors on exceptions
rodzic
025ec317e3
commit
13b2d09a42
|
@ -1787,9 +1787,7 @@ static void gl124_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home)
|
|||
try {
|
||||
gl124_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl124_stop_action (dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl124_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
|
|
@ -2554,9 +2554,7 @@ static void gl841_eject_document(Genesys_Device* dev)
|
|||
try {
|
||||
gl841_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl841_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl841_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
@ -2803,9 +2801,7 @@ static void gl841_feed(Genesys_Device* dev, int steps)
|
|||
try {
|
||||
gl841_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl841_stop_action (dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl841_stop_action (dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
@ -2918,9 +2914,7 @@ static void gl841_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home)
|
|||
try {
|
||||
gl841_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl841_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl841_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
|
|
@ -2212,9 +2212,7 @@ static void gl843_park_xpa_lamp(Genesys_Device* dev)
|
|||
try {
|
||||
gl843_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl843_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl843_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
@ -2324,9 +2322,7 @@ static void gl843_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home)
|
|||
try {
|
||||
gl843_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl843_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl843_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
@ -2543,9 +2539,7 @@ static void gl843_feed(Genesys_Device* dev, unsigned int steps)
|
|||
try {
|
||||
gl843_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl843_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl843_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
|
|
@ -1594,9 +1594,7 @@ static void gl847_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home)
|
|||
try {
|
||||
gl847_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl847_stop_action(dev);
|
||||
} catch (...) {}
|
||||
catch_all_exceptions(__func__, [&]() { gl847_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
|
@ -1802,13 +1800,12 @@ static void gl847_feed(Genesys_Device* dev, unsigned int steps)
|
|||
try {
|
||||
gl847_start_action(dev);
|
||||
} catch (...) {
|
||||
try {
|
||||
gl847_stop_action(dev);
|
||||
} catch (...) {}
|
||||
try {
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]() { gl847_stop_action(dev); });
|
||||
// restore original registers
|
||||
catch_all_exceptions(__func__, [&]()
|
||||
{
|
||||
dev->model->cmd_set->bulk_write_register(dev, dev->reg);
|
||||
} catch (...) {}
|
||||
});
|
||||
throw;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue