Fix catching by value
Pointed out by LGTM. Change-Id: I223655c728305f6f45b3738553da5b7d7a69e8c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2134 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
654135466f
commit
992ae400ec
@@ -278,7 +278,7 @@ SymbolLookup::Init()
|
||||
TRACE(("SymbolLookup::Init(): translated debug area is at: %p, "
|
||||
"loaded_images: %p\n", fDebugArea, fDebugArea->loaded_images));
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
} catch (Exception& exception) {
|
||||
// we can live without the debug area
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ debug_create_symbol_lookup_context(team_id team, image_id image,
|
||||
status_t error = lookup->Init();
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
} catch (BPrivate::Debug::Exception exception) {
|
||||
} catch (BPrivate::Debug::Exception& exception) {
|
||||
return exception.Error();
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ debug_lookup_symbol_address(debug_symbol_lookup_context *lookupContext,
|
||||
exactMatch);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
} catch (BPrivate::Debug::Exception exception) {
|
||||
} catch (BPrivate::Debug::Exception& exception) {
|
||||
return exception.Error();
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ debug_create_image_symbol_iterator(debug_symbol_lookup_context* lookupContext,
|
||||
status_t error;
|
||||
try {
|
||||
error = lookup->InitSymbolIterator(imageID, *iterator);
|
||||
} catch (BPrivate::Debug::Exception exception) {
|
||||
} catch (BPrivate::Debug::Exception& exception) {
|
||||
error = exception.Error();
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ debug_create_image_symbol_iterator(debug_symbol_lookup_context* lookupContext,
|
||||
try {
|
||||
error = lookup->InitSymbolIteratorByAddress(
|
||||
(addr_t)imageInfo.text, *iterator);
|
||||
} catch (BPrivate::Debug::Exception exception) {
|
||||
} catch (BPrivate::Debug::Exception& exception) {
|
||||
error = exception.Error();
|
||||
}
|
||||
}
|
||||
@@ -565,7 +565,7 @@ debug_next_image_symbol(debug_symbol_iterator* iterator, char* nameBuffer,
|
||||
_symbolType);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
} catch (BPrivate::Debug::Exception exception) {
|
||||
} catch (BPrivate::Debug::Exception& exception) {
|
||||
return exception.Error();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user