Fix lint errors about catching exceptions by value

Esse commit está contido em:
Jordan DeLong
2013-04-20 13:19:48 -07:00
commit de Sara Golemon
commit a2df3fcf9a
25 arquivos alterados com 91 adições e 91 exclusões
+2 -2
Ver Arquivo
@@ -359,7 +359,7 @@ int prepareOptions(CompilerOptions &po, int argc, char **argv) {
store(command_line_parser(argc, argv).options(desc).positional(p).run(),
vm);
notify(vm);
} catch (unknown_option e) {
} catch (const unknown_option& e) {
Logger::Error("Error in command line: %s\n\n", e.what());
cout << desc << "\n";
return -1;
@@ -677,7 +677,7 @@ int process(const CompilerOptions &po) {
int runId = package.saveStatsToDB(server, seconds, po.branch,
po.revision);
package.commitStats(server, runId);
} catch (DatabaseException e) {
} catch (const DatabaseException& e) {
Logger::Error("%s", e.what());
}
} else {
@@ -218,7 +218,7 @@ ExpressionPtr BinaryOpExpression::simplifyLogical(AnalysisResultConstPtr ar) {
try {
ExpressionPtr rep = foldConst(ar);
if (rep) return replaceValue(rep);
} catch (Exception e) {
} catch (const Exception& e) {
}
return ExpressionPtr();
}
+2 -2
Ver Arquivo
@@ -84,7 +84,7 @@ void AsioSession::onFailed(CObjRef exception) {
if (m_onFailedCallback) {
try {
vm_call_user_func(m_onFailedCallback, Array::Create(exception));
} catch (Object callback_exception) {
} catch (const Object& callback_exception) {
raise_warning("[asio] Ignoring exception thrown by onFailed callback");
}
}
@@ -106,7 +106,7 @@ void AsioSession::onStarted(CObjRef wait_handle) {
assert(m_onStartedCallback);
try {
vm_call_user_func(m_onStartedCallback, Array::Create(wait_handle));
} catch (Object callback_exception) {
} catch (const Object& callback_exception) {
raise_warning("[asio] Ignoring exception thrown by onStarted callback");
}
}
@@ -157,7 +157,7 @@ void c_ContinuationWaitHandle::run() {
// we are blocked on m_child so it must be WaitableWaitHandle
assert(dynamic_cast<c_WaitableWaitHandle*>(m_child.get()));
blockOn(static_cast<c_WaitableWaitHandle*>(m_child.get()));
} catch (Object exception) {
} catch (const Object& exception) {
// process exception thrown by generator or blockOn cycle detection
markAsFailed(exception);
}
@@ -200,7 +200,7 @@ String c_ContinuationWaitHandle::getName() {
return m_continuation->t_getorigfuncname();
default:
throw new FatalErrorException(
throw FatalErrorException(
"Invariant violation: encountered unexpected state");
}
}
+3 -3
Ver Arquivo
@@ -114,7 +114,7 @@ void c_GenArrayWaitHandle::initialize(CObjRef exception, CArrRef deps, ssize_t i
m_iterPos = iter_pos;
try {
blockOn(child);
} catch (Object cycle_exception) {
} catch (const Object& cycle_exception) {
putException(m_exception, cycle_exception.get());
m_iterPos = m_deps->iter_advance(m_iterPos);
onUnblocked();
@@ -148,7 +148,7 @@ void c_GenArrayWaitHandle::onUnblocked() {
try {
blockOn(child_wh);
return;
} catch (Object cycle_exception) {
} catch (const Object& cycle_exception) {
putException(m_exception, cycle_exception.get());
}
}
@@ -229,7 +229,7 @@ void c_GenArrayWaitHandle::enterContext(context_idx_t ctx_idx) {
auto child_wh = static_cast<c_WaitableWaitHandle*>(child);
child_wh->enterContext(ctx_idx);
}
} catch (Object cycle_exception) {
} catch (const Object& cycle_exception) {
// exception will be eventually processed by onUnblocked()
}
}
@@ -89,7 +89,7 @@ void c_SetResultToRefWaitHandle::initialize(c_WaitableWaitHandle* child, RefData
m_ref->incRefCount();
try {
blockOn(child);
} catch (Object cycle_exception) {
} catch (const Object& cycle_exception) {
markAsFailed(cycle_exception);
}
}
+1 -1
Ver Arquivo
@@ -209,7 +209,7 @@ void c_WaitableWaitHandle::join() {
// run queues until we are finished
session->getCurrentContext()->runUntil(this);
} catch (Object exception) {
} catch (const Object& exception) {
// recover from PHP exceptions; HPHP internal exceptions are deliberately
// ignored as there is no easy way to recover from them
session->exitContext();
+1 -1
Ver Arquivo
@@ -275,7 +275,7 @@ bool f_stream_wrapper_register(CStrRef protocol, CStrRef classname) {
try {
wrapper = std::unique_ptr<Stream::Wrapper>(
new UserStreamWrapper(protocol, classname));
} catch (InvalidArgumentException e) {
} catch (const InvalidArgumentException& e) {
raise_warning("%s", e.what());
return false;
}
+2 -2
Ver Arquivo
@@ -67,7 +67,7 @@ bool TestExtApache::test_getallheaders() {
bool TestExtApache::test_virtual() {
try {
f_virtual("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -86,7 +86,7 @@ bool TestExtApache::test_apache_get_scoreboard() {
bool TestExtApache::test_apache_get_rewrite_rules() {
try {
f_apache_get_rewrite_rules();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+9 -9
Ver Arquivo
@@ -190,7 +190,7 @@ bool TestExtApc::test_apc_delete() {
bool TestExtApc::test_apc_compile_file() {
try {
f_apc_compile_file("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -218,7 +218,7 @@ bool TestExtApc::test_apc_clear_cache() {
bool TestExtApc::test_apc_define_constants() {
try {
f_apc_define_constants("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -227,7 +227,7 @@ bool TestExtApc::test_apc_define_constants() {
bool TestExtApc::test_apc_load_constants() {
try {
f_apc_load_constants("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -241,7 +241,7 @@ bool TestExtApc::test_apc_sma_info() {
bool TestExtApc::test_apc_filehits() {
try {
f_apc_filehits();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -250,7 +250,7 @@ bool TestExtApc::test_apc_filehits() {
bool TestExtApc::test_apc_delete_file() {
try {
f_apc_delete_file("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -284,7 +284,7 @@ bool TestExtApc::test_apc_cas() {
bool TestExtApc::test_apc_bin_dump() {
try {
f_apc_bin_dump();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -293,7 +293,7 @@ bool TestExtApc::test_apc_bin_dump() {
bool TestExtApc::test_apc_bin_load() {
try {
f_apc_bin_load("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -302,7 +302,7 @@ bool TestExtApc::test_apc_bin_load() {
bool TestExtApc::test_apc_bin_dumpfile() {
try {
f_apc_bin_dumpfile(0, uninit_null(), "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -311,7 +311,7 @@ bool TestExtApc::test_apc_bin_dumpfile() {
bool TestExtApc::test_apc_bin_loadfile() {
try {
f_apc_bin_loadfile("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+9 -9
Ver Arquivo
@@ -40,7 +40,7 @@ bool TestExtApd::RunTests(const std::string &which) {
bool TestExtApd::test_override_function() {
try {
f_override_function("", "", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -49,7 +49,7 @@ bool TestExtApd::test_override_function() {
bool TestExtApd::test_rename_function() {
try {
f_rename_function("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -58,7 +58,7 @@ bool TestExtApd::test_rename_function() {
bool TestExtApd::test_apd_set_browser_trace() {
try {
f_apd_set_browser_trace();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -67,7 +67,7 @@ bool TestExtApd::test_apd_set_browser_trace() {
bool TestExtApd::test_apd_set_pprof_trace() {
try {
f_apd_set_pprof_trace("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -76,7 +76,7 @@ bool TestExtApd::test_apd_set_pprof_trace() {
bool TestExtApd::test_apd_set_session_trace_socket() {
try {
f_apd_set_session_trace_socket("", 0, 0, 0);
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -85,7 +85,7 @@ bool TestExtApd::test_apd_set_session_trace_socket() {
bool TestExtApd::test_apd_stop_trace() {
try {
f_apd_stop_trace();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -94,7 +94,7 @@ bool TestExtApd::test_apd_stop_trace() {
bool TestExtApd::test_apd_breakpoint() {
try {
f_apd_breakpoint();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -103,7 +103,7 @@ bool TestExtApd::test_apd_breakpoint() {
bool TestExtApd::test_apd_continue() {
try {
f_apd_continue();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -112,7 +112,7 @@ bool TestExtApd::test_apd_continue() {
bool TestExtApd::test_apd_echo() {
try {
f_apd_echo("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+1 -1
Ver Arquivo
@@ -58,7 +58,7 @@ static ServerPtr runServer() {
server->start();
return server;
} catch (FailedToListenException e) {
} catch (const FailedToListenException& e) {
if (s_server_port == PORT_MAX) throw;
}
}
+1 -1
Ver Arquivo
@@ -79,7 +79,7 @@ bool TestExtDatetime::RunTests(const std::string &which) {
/* Ignore unimplemented datetime features when timelib is old */
#define TIMELIB_TEST_UNIMPL(minver, exp) try { exp } \
catch (NotImplementedException e) { \
catch (const NotImplementedException& e) { \
return Count(f_timezone_version_get().toDouble() < minver); \
}
+3 -3
Ver Arquivo
@@ -92,7 +92,7 @@ bool TestExtFunction::test_forward_static_call() {
bool TestExtFunction::test_create_function() {
try {
f_create_function("$a", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(false);
}
return Count(true);
@@ -131,7 +131,7 @@ bool TestExtFunction::test_register_cleanup_function() {
bool TestExtFunction::test_register_tick_function() {
try {
f_register_tick_function(0, "test", Array::Create());
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
@@ -140,7 +140,7 @@ bool TestExtFunction::test_register_tick_function() {
bool TestExtFunction::test_unregister_tick_function() {
try {
f_unregister_tick_function("test");
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
+7 -7
Ver Arquivo
@@ -101,7 +101,7 @@ bool TestExtMisc::test_exit() {
bool TestExtMisc::test_eval() {
try {
f_eval("sleep(5);");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(false);
}
return Count(true);
@@ -110,7 +110,7 @@ bool TestExtMisc::test_eval() {
bool TestExtMisc::test_get_browser() {
try {
f_get_browser();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -124,7 +124,7 @@ bool TestExtMisc::test___halt_compiler() {
bool TestExtMisc::test_highlight_file() {
try {
f_highlight_file("a");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -133,7 +133,7 @@ bool TestExtMisc::test_highlight_file() {
bool TestExtMisc::test_show_source() {
try {
f_show_source("a");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -142,7 +142,7 @@ bool TestExtMisc::test_show_source() {
bool TestExtMisc::test_highlight_string() {
try {
f_highlight_string("a");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -161,7 +161,7 @@ bool TestExtMisc::test_pack() {
bool TestExtMisc::test_php_check_syntax() {
try {
f_php_check_syntax("a");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -170,7 +170,7 @@ bool TestExtMisc::test_php_check_syntax() {
bool TestExtMisc::test_php_strip_whitespace() {
try {
f_php_strip_whitespace("a");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+4 -4
Ver Arquivo
@@ -242,7 +242,7 @@ bool TestExtMysql::test_mysql_thread_id() {
bool TestExtMysql::test_mysql_create_db() {
try {
f_mysql_create_db("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -256,7 +256,7 @@ bool TestExtMysql::test_mysql_select_db() {
bool TestExtMysql::test_mysql_drop_db() {
try {
f_mysql_drop_db("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -369,7 +369,7 @@ bool TestExtMysql::test_mysql_unbuffered_query() {
bool TestExtMysql::test_mysql_db_query() {
try {
f_mysql_db_query("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -398,7 +398,7 @@ bool TestExtMysql::test_mysql_list_fields() {
Variant conn = f_mysql_connect(TEST_HOSTNAME, TEST_USERNAME,
TEST_PASSWORD);
f_mysql_list_fields(TEST_DATABASE, "test");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+15 -15
Ver Arquivo
@@ -91,7 +91,7 @@ bool TestExtOptions::test_assert() {
f_assert(true);
try {
f_assert(false);
} catch (Assertion e) {
} catch (const Assertion& e) {
return Count(true);
}
return Count(true);
@@ -120,7 +120,7 @@ bool TestExtOptions::test_get_loaded_extensions() {
bool TestExtOptions::test_get_extension_funcs() {
try {
f_get_extension_funcs("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -129,7 +129,7 @@ bool TestExtOptions::test_get_extension_funcs() {
bool TestExtOptions::test_get_cfg_var() {
try {
f_get_cfg_var("");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -144,7 +144,7 @@ bool TestExtOptions::test_get_defined_constants() {
try {
f_get_defined_constants(true);
return Count(false);
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
f_get_defined_constants();
@@ -189,7 +189,7 @@ bool TestExtOptions::test_get_magic_quotes_runtime() {
bool TestExtOptions::test_get_required_files() {
try {
f_get_required_files();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -203,7 +203,7 @@ bool TestExtOptions::test_getenv() {
bool TestExtOptions::test_getlastmod() {
try {
f_getlastmod();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -217,7 +217,7 @@ bool TestExtOptions::test_getmygid() {
bool TestExtOptions::test_getmyinode() {
try {
f_getmyinode();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -275,7 +275,7 @@ bool TestExtOptions::test_cpu_get_model() {
bool TestExtOptions::test_ini_alter() {
try {
f_ini_alter("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -284,7 +284,7 @@ bool TestExtOptions::test_ini_alter() {
bool TestExtOptions::test_ini_get_all() {
try {
f_ini_get_all();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -324,7 +324,7 @@ bool TestExtOptions::test_memory_get_usage() {
bool TestExtOptions::test_php_ini_scanned_files() {
try {
f_php_ini_scanned_files();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -333,7 +333,7 @@ bool TestExtOptions::test_php_ini_scanned_files() {
bool TestExtOptions::test_php_logo_guid() {
try {
f_php_logo_guid();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -352,7 +352,7 @@ bool TestExtOptions::test_php_uname() {
bool TestExtOptions::test_phpcredits() {
try {
f_phpcredits();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -397,7 +397,7 @@ bool TestExtOptions::test_version_compare() {
bool TestExtOptions::test_zend_logo_guid() {
try {
f_zend_logo_guid();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -406,7 +406,7 @@ bool TestExtOptions::test_zend_logo_guid() {
bool TestExtOptions::test_zend_thread_id() {
try {
f_zend_thread_id();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -415,7 +415,7 @@ bool TestExtOptions::test_zend_thread_id() {
bool TestExtOptions::test_zend_version() {
try {
f_zend_version();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+3 -3
Ver Arquivo
@@ -166,7 +166,7 @@ bool TestExtOutput::test_ob_get_status() {
bool TestExtOutput::test_ob_gzhandler() {
try {
f_ob_gzhandler("value", 0);
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -191,7 +191,7 @@ bool TestExtOutput::test_ob_list_handlers() {
bool TestExtOutput::test_output_add_rewrite_var() {
try {
f_output_add_rewrite_var("name", "value");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -200,7 +200,7 @@ bool TestExtOutput::test_output_add_rewrite_var() {
bool TestExtOutput::test_output_reset_rewrite_vars() {
try {
f_output_reset_rewrite_vars();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+1 -1
Ver Arquivo
@@ -276,7 +276,7 @@ bool TestExtPreg::test_preg_replace() {
f_preg_replace("/(<\\/?)(\\w+)([^>]*>)/e",
"'\\\\1'.strtoupper('\\\\2').'\\\\3'",
html_body);
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
}
+1 -1
Ver Arquivo
@@ -71,7 +71,7 @@ bool TestExtSimplexml::test_libxml_use_internal_errors() {
bool TestExtSimplexml::test_libxml_set_streams_context() {
try {
f_libxml_set_streams_context(Object());
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
+15 -15
Ver Arquivo
@@ -90,7 +90,7 @@ bool TestExtStream::test_stream_context_create() {
bool TestExtStream::test_stream_context_get_default() {
try {
f_stream_context_get_default();
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
@@ -99,7 +99,7 @@ bool TestExtStream::test_stream_context_get_default() {
bool TestExtStream::test_stream_context_get_options() {
try {
f_stream_context_get_options(Object());
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
@@ -108,7 +108,7 @@ bool TestExtStream::test_stream_context_get_options() {
bool TestExtStream::test_stream_context_set_option() {
try {
f_stream_context_set_option(Object(), "");
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
@@ -117,7 +117,7 @@ bool TestExtStream::test_stream_context_set_option() {
bool TestExtStream::test_stream_context_set_param() {
try {
f_stream_context_set_param(Object(), Array());
} catch (NotImplementedException e) {
} catch (const NotImplementedException& e) {
return Count(true);
}
return Count(false);
@@ -137,7 +137,7 @@ bool TestExtStream::test_stream_copy_to_stream() {
bool TestExtStream::test_stream_encoding() {
try {
f_stream_encoding(Object());
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -146,7 +146,7 @@ bool TestExtStream::test_stream_encoding() {
bool TestExtStream::test_stream_bucket_append() {
try {
f_stream_bucket_append(Object(), Object());
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -155,7 +155,7 @@ bool TestExtStream::test_stream_bucket_append() {
bool TestExtStream::test_stream_bucket_prepend() {
try {
f_stream_bucket_prepend(Object(), Object());
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -164,7 +164,7 @@ bool TestExtStream::test_stream_bucket_prepend() {
bool TestExtStream::test_stream_bucket_make_writeable() {
try {
f_stream_bucket_make_writeable(Object());
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -173,7 +173,7 @@ bool TestExtStream::test_stream_bucket_make_writeable() {
bool TestExtStream::test_stream_bucket_new() {
try {
f_stream_bucket_new(Object(), "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -182,7 +182,7 @@ bool TestExtStream::test_stream_bucket_new() {
bool TestExtStream::test_stream_filter_register() {
try {
f_stream_filter_register("", "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -191,7 +191,7 @@ bool TestExtStream::test_stream_filter_register() {
bool TestExtStream::test_stream_filter_remove() {
try {
f_stream_filter_remove(Object());
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -200,7 +200,7 @@ bool TestExtStream::test_stream_filter_remove() {
bool TestExtStream::test_stream_filter_append() {
try {
f_stream_filter_append(Object(), "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -209,7 +209,7 @@ bool TestExtStream::test_stream_filter_append() {
bool TestExtStream::test_stream_filter_prepend() {
try {
f_stream_filter_prepend(Object(), "");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -242,7 +242,7 @@ bool TestExtStream::test_stream_get_contents() {
bool TestExtStream::test_stream_get_filters() {
try {
f_stream_get_filters();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -383,7 +383,7 @@ bool TestExtStream::test_stream_socket_client() {
bool TestExtStream::test_stream_socket_enable_crypto() {
try {
f_stream_socket_enable_crypto(Object(), true);
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+1 -1
Ver Arquivo
@@ -396,7 +396,7 @@ bool TestExtVariable::test_get_defined_vars() {
bool TestExtVariable::test_import_request_variables() {
try {
f_import_request_variables("G");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
+3 -3
Ver Arquivo
@@ -116,7 +116,7 @@ bool TestExtZlib::test_gzdecode() {
bool TestExtZlib::test_zlib_get_coding_type() {
try {
f_zlib_get_coding_type();
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
return Count(true);
}
return Count(false);
@@ -223,7 +223,7 @@ bool TestExtZlib::test_qlzuncompress() {
"testing gzcompress");
VS(f_qlzuncompress(f_qlzcompress("testing gzcompress", 3), 3),
"testing gzcompress");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
SKIP("no qlzcompress() support");
}
return Count(true);
@@ -238,7 +238,7 @@ bool TestExtZlib::test_snuncompress() {
try {
VS(f_snuncompress(f_sncompress("testing sncompress")),
"testing sncompress");
} catch (NotSupportedException e) {
} catch (const NotSupportedException& e) {
SKIP("No sncompress() support");
}
return Count(true);
+2 -2
Ver Arquivo
@@ -194,7 +194,7 @@ static int find_server_port(int port_min, int port_max) {
server->stop();
server->waitForEnd();
return port;
} catch (FailedToListenException e) {
} catch (const FailedToListenException& e) {
if (port >= port_max) throw;
}
}
@@ -569,7 +569,7 @@ bool TestServer::TestHttpClient() {
("127.0.0.1", s_server_port, 50, -1));
server->start();
break;
} catch (FailedToListenException e) {
} catch (const FailedToListenException& e) {
if (s_server_port == PORT_MAX) throw;
}
}
+1 -1
Ver Arquivo
@@ -284,7 +284,7 @@ public:
}
}
}
} catch (typename QueueType::StopSignal) {
} catch (const typename QueueType::StopSignal&) {
m_stopped = true; // queue is empty and stopped, so we are done
}
}