Merge lp:~mordred/drizzle/bug682842 into lp:drizzle/7.0

Proposed by Monty Taylor
Status: Merged
Approved by: Brian Aker
Approved revision: 1967
Merged at revision: 1969
Proposed branch: lp:~mordred/drizzle/bug682842
Merge into: lp:drizzle/7.0
Diff against target: 160 lines (+14/-12)
11 files modified
client/drizzledump.cc (+3/-3)
client/drizzledump_data.cc (+1/-1)
client/drizzledump_data.h (+1/-1)
client/drizzledump_drizzle.cc (+1/-1)
client/drizzledump_mysql.cc (+1/-1)
drizzled/drizzled.cc (+1/-1)
drizzled/module/loader.cc (+1/-1)
drizzled/plugin/storage_engine.cc (+2/-1)
drizzled/program_options/config_file.h (+1/-1)
drizzled/sql_parse.cc (+1/-0)
drizzled/sys_var.cc (+1/-1)
To merge this branch: bzr merge lp:~mordred/drizzle/bug682842
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+42437@code.launchpad.net

Description of the change

Replaced a bunch of catch(...) with catch (std::exception&)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/drizzledump.cc'
2--- client/drizzledump.cc 2010-11-11 16:51:37 +0000
3+++ client/drizzledump.cc 2010-12-02 00:41:29 +0000
4@@ -200,7 +200,7 @@
5 opt_destination_port, opt_destination_user, opt_destination_password,
6 false);
7 }
8- catch (...)
9+ catch (std::exception&)
10 {
11 cerr << "Could not connect to destination database server" << endl;
12 maybe_exit(EX_DRIZZLEERR);
13@@ -225,7 +225,7 @@
14 DrizzleDumpDatabase *database= *i;
15 sout << *database;
16 }
17- catch (...)
18+ catch (std::exception&)
19 {
20 std::cout << _("Error inserting into destination database") << std::endl;
21 if (not ignore_errors)
22@@ -754,7 +754,7 @@
23 db_connection = new DrizzleDumpConnection(current_host, opt_drizzle_port,
24 current_user, opt_password, use_drizzle_protocol);
25 }
26- catch (...)
27+ catch (std::exception&)
28 {
29 maybe_exit(EX_DRIZZLEERR);
30 }
31
32=== modified file 'client/drizzledump_data.cc'
33--- client/drizzledump_data.cc 2010-11-02 10:28:05 +0000
34+++ client/drizzledump_data.cc 2010-12-02 00:41:29 +0000
35@@ -526,7 +526,7 @@
36 if (ret != DRIZZLE_RETURN_OK)
37 {
38 errorHandler(NULL, ret, "when trying to connect");
39- throw 1;
40+ throw std::exception();
41 }
42
43 boost::match_flag_type flags = boost::match_default;
44
45=== modified file 'client/drizzledump_data.h'
46--- client/drizzledump_data.h 2010-10-27 21:23:31 +0000
47+++ client/drizzledump_data.h 2010-12-02 00:41:29 +0000
48@@ -262,7 +262,7 @@
49 void writeString(std::string &str)
50 {
51 if (not connection->queryNoResult(str))
52- throw 1;
53+ throw std::exception();
54 }
55
56 void setConnection(DrizzleDumpConnection *conn) { connection= conn; }
57
58=== modified file 'client/drizzledump_drizzle.cc'
59--- client/drizzledump_drizzle.cc 2010-10-15 12:45:07 +0000
60+++ client/drizzledump_drizzle.cc 2010-12-02 00:41:29 +0000
61@@ -351,7 +351,7 @@
62 result= dcon->query(query);
63
64 if (result == NULL)
65- throw 1;
66+ throw std::exception();
67 }
68
69 DrizzleDumpDataDrizzle::~DrizzleDumpDataDrizzle()
70
71=== modified file 'client/drizzledump_mysql.cc'
72--- client/drizzledump_mysql.cc 2010-11-02 10:28:05 +0000
73+++ client/drizzledump_mysql.cc 2010-12-02 00:41:29 +0000
74@@ -570,7 +570,7 @@
75
76 result= dcon->query(query);
77 if (result == NULL)
78- throw 1;
79+ throw std::exception();
80 }
81
82 DrizzleDumpDataMySQL::~DrizzleDumpDataMySQL()
83
84=== modified file 'drizzled/drizzled.cc'
85--- drizzled/drizzled.cc 2010-11-29 03:53:29 +0000
86+++ drizzled/drizzled.cc 2010-12-02 00:41:29 +0000
87@@ -1356,7 +1356,7 @@
88 {
89 po::store(parsed, vm);
90 }
91- catch (...)
92+ catch (std::exception&)
93 {
94 errmsg_printf(ERRMSG_LVL_ERROR, _("Duplicate entry for command line option\n"));
95 unireg_abort(1);
96
97=== modified file 'drizzled/module/loader.cc'
98--- drizzled/module/loader.cc 2010-11-08 19:36:08 +0000
99+++ drizzled/module/loader.cc 2010-12-02 00:41:29 +0000
100@@ -1719,7 +1719,7 @@
101 add_sys_var_to_list(v);
102 test_module->addSysVar(v);
103 }
104- catch (...)
105+ catch (std::exception&)
106 {
107 errmsg_printf(ERRMSG_LVL_ERROR,
108 _("Plugin '%s' has conflicting system variables"),
109
110=== modified file 'drizzled/plugin/storage_engine.cc'
111--- drizzled/plugin/storage_engine.cc 2010-11-27 03:55:30 +0000
112+++ drizzled/plugin/storage_engine.cc 2010-12-02 00:41:29 +0000
113@@ -1067,7 +1067,8 @@
114
115 bool success;
116
117- try {
118+ try
119+ {
120 success= table_message.SerializeToZeroCopyStream(output);
121 }
122 catch (...)
123
124=== modified file 'drizzled/program_options/config_file.h'
125--- drizzled/program_options/config_file.h 2010-11-14 02:04:38 +0000
126+++ drizzled/program_options/config_file.h 2010-12-02 00:41:29 +0000
127@@ -65,7 +65,7 @@
128 return boost::lexical_cast<std::string>(new_size);
129 }
130 }
131- catch (...)
132+ catch (std::exception&)
133 { }
134
135 return arg_val;
136
137=== modified file 'drizzled/sql_parse.cc'
138--- drizzled/sql_parse.cc 2010-11-22 20:27:31 +0000
139+++ drizzled/sql_parse.cc 2010-12-02 00:41:29 +0000
140@@ -755,6 +755,7 @@
141 {
142 // Just try to catch any random failures that could have come
143 // during execution.
144+ unireg_abort(1);
145 }
146 DRIZZLE_QUERY_EXEC_DONE(0);
147 }
148
149=== modified file 'drizzled/sys_var.cc'
150--- drizzled/sys_var.cc 2010-11-18 03:22:35 +0000
151+++ drizzled/sys_var.cc 2010-12-02 00:41:29 +0000
152@@ -1657,7 +1657,7 @@
153 add_sys_var_to_list(&sys_version_compile_vendor, my_long_options);
154 add_sys_var_to_list(&sys_warning_count, my_long_options);
155 }
156- catch (...)
157+ catch (std::exception&)
158 {
159 errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize system variables"));
160 return(1);

Subscribers

People subscribed via source and target branches