Catch exceptions by reference

We use polymorphic exception objects, so catching by value invokes
the copy constructor and stuff that we don't really want.
diff --git a/tests/decperf.cxx b/tests/decperf.cxx
index 3b929a4..9061cb5 100644
--- a/tests/decperf.cxx
+++ b/tests/decperf.cxx
@@ -142,7 +142,7 @@
 
   try {
     cc = new CConn(fn);
-  } catch (rdr::Exception e) {
+  } catch (rdr::Exception& e) {
     fprintf(stderr, "Failed to open rfb file: %s\n", e.str());
     exit(1);
   }
@@ -150,8 +150,8 @@
   try {
     while (true)
       cc->processMsg();
-  } catch (rdr::EndOfStream e) {
-  } catch (rdr::Exception e) {
+  } catch (rdr::EndOfStream& e) {
+  } catch (rdr::Exception& e) {
     fprintf(stderr, "Failed to run rfb file: %s\n", e.str());
     exit(1);
   }