25 lines
675 B
Diff
25 lines
675 B
Diff
From a54a62a4e1a4e6bd34284a5de44550979f3155ec Mon Sep 17 00:00:00 2001
|
|
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
|
Date: Mon, 2 Jan 2023 07:46:32 +0100
|
|
Subject: [PATCH 1/6] Catch exception by reference
|
|
|
|
---
|
|
src/common/options.cc | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/common/options.cc b/src/common/options.cc
|
|
index 027644a..d700950 100644
|
|
--- a/src/common/options.cc
|
|
+++ b/src/common/options.cc
|
|
@@ -198,7 +198,7 @@ getopts(int argc, char * const argv[], struct option *longopts)
|
|
|
|
try {
|
|
opts = new struct option[num+1];
|
|
- } catch ( std::bad_alloc) {
|
|
+ } catch (std::bad_alloc &e) {
|
|
return false;
|
|
}
|
|
|
|
--
|
|
2.38.1
|
|
|