From: Sebastian Ramacher <sramacher@debian.org>
Date: Fri, 4 May 2018 21:11:53 +0200
Subject: Use const& when catching exceptions

This fixes compiler warnings from GCC 8.

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
---
 examples/example.cc | 10 +++++-----
 src/HTTPFetch.cc    |  2 +-
 tests/test.cc       |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/examples/example.cc b/examples/example.cc
index ef5752f..1582a7d 100644
--- a/examples/example.cc
+++ b/examples/example.cc
@@ -60,7 +60,7 @@ int main(int argc, const char *argv[])
 			}
 		}
 
-		catch (CoverArtArchive::CExceptionBase e)
+		catch (const CoverArtArchive::CExceptionBase& e)
 		{
 			std::cout << "Exception: '" << e.what() << "'" << std::endl;
 		}
@@ -81,7 +81,7 @@ int main(int argc, const char *argv[])
 			}
 		}
 
-		catch (CoverArtArchive::CExceptionBase e)
+		catch (const CoverArtArchive::CExceptionBase& e)
 		{
 			std::cout << "Exception: '" << e.what() << "'" << std::endl;
 		}
@@ -134,7 +134,7 @@ int main(int argc, const char *argv[])
 						Full.close();
 					}
 
-					catch (CoverArtArchive::CExceptionBase e)
+					catch (const CoverArtArchive::CExceptionBase& e)
 					{
 						std::cout << "Exception: '" << e.what() << "'" << std::endl;
 					}
@@ -158,7 +158,7 @@ int main(int argc, const char *argv[])
 								Large.close();
 							}
 
-							catch (CoverArtArchive::CExceptionBase e)
+							catch (const CoverArtArchive::CExceptionBase& e)
 							{
 								std::cout << "Exception: '" << e.what() << "'" << std::endl;
 							}
@@ -180,7 +180,7 @@ int main(int argc, const char *argv[])
 								Small.close();
 							}
 
-							catch (CoverArtArchive::CExceptionBase e)
+							catch (const CoverArtArchive::CExceptionBase& e)
 							{
 								std::cout << "Exception: '" << e.what() << "'" << std::endl;
 							}
diff --git a/src/HTTPFetch.cc b/src/HTTPFetch.cc
index 5809a70..fd30ee4 100644
--- a/src/HTTPFetch.cc
+++ b/src/HTTPFetch.cc
@@ -153,7 +153,7 @@ int CoverArtArchive::CHTTPFetch::Fetch(const std::string& URL, bool FollowRedire
 			Finished=true;
 		}
 
-		catch(CRedirect r)
+		catch(const CRedirect& r)
 		{
 			if (FollowRedirects)
 			{
diff --git a/tests/test.cc b/tests/test.cc
index 7a692db..005358f 100644
--- a/tests/test.cc
+++ b/tests/test.cc
@@ -27,7 +27,7 @@ int main(int /*argc*/, const char */*argv*/[])
 		std::cout << "Image has size " << Image.size() << std::endl;
 	}
 
-	catch (CoverArtArchive::CExceptionBase e)
+	catch (const CoverArtArchive::CExceptionBase& e)
 	{
 		std::cout << "Exception: " << e.what() << std::endl;
 	}
