From fafe40c530d26aa10cfd5c5a768a7f2fb0a560ee Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 4 Nov 2022 17:11:51 +0100 Subject: [PATCH] fix namespace for exception errors * spot/priv/satcommon.cc, spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc: When setting exception on std::ofstream, use ofstream::failbit and ofstream::badbit instead of ifstream::failbit and ifstream::badbit. --- spot/priv/satcommon.cc | 4 ++-- spot/twaalgos/dtbasat.cc | 4 ++-- spot/twaalgos/dtwasat.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spot/priv/satcommon.cc b/spot/priv/satcommon.cc index 21d75eee1..aec73d104 100644 --- a/spot/priv/satcommon.cc +++ b/spot/priv/satcommon.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013-2019 Laboratoire de Recherche et Développement +// Copyright (C) 2013-2019, 2022 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. @@ -167,7 +167,7 @@ namespace spot return; std::ofstream out(log, std::ios_base::ate | std::ios_base::app); - out.exceptions(std::ifstream::failbit | std::ifstream::badbit); + out.exceptions(std::ofstream::failbit | std::ofstream::badbit); if (out.tellp() == 0) out << ("input.states,target.states,reachable.states,edges,transitions," diff --git a/spot/twaalgos/dtbasat.cc b/spot/twaalgos/dtbasat.cc index eb39a69b6..b2147ebb4 100644 --- a/spot/twaalgos/dtbasat.cc +++ b/spot/twaalgos/dtbasat.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013-2018, 2021 Laboratoire de Recherche et +// Copyright (C) 2013-2018, 2021, 2022 Laboratoire de Recherche et // Développement de l'Epita. // // This file is part of Spot, a model checking library. @@ -585,7 +585,7 @@ namespace spot #if TRACE std::fstream out("dtba-sat.dbg", std::ios_base::trunc | std::ios_base::out); - out.exceptions(std::ifstream::failbit | std::ifstream::badbit); + out.exceptions(std::ofstream::failbit | std::ofstream::badbit); #endif std::set acc_states; std::set seen_trans; diff --git a/spot/twaalgos/dtwasat.cc b/spot/twaalgos/dtwasat.cc index 670a9ffc8..25a299154 100644 --- a/spot/twaalgos/dtwasat.cc +++ b/spot/twaalgos/dtwasat.cc @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2013-2021 Laboratoire de Recherche +// Copyright (C) 2013-2022 Laboratoire de Recherche // et Développement de l'Epita. // // This file is part of Spot, a model checking library. @@ -864,7 +864,7 @@ namespace spot #if TRACE std::fstream out("dtwa-sat.dbg", std::ios_base::trunc | std::ios_base::out); - out.exceptions(std::ifstream::failbit | std::ifstream::badbit); + out.exceptions(std::ofstream::failbit | std::ofstream::badbit); #endif std::map state_acc; std::set seen_trans;