summaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-03-26 11:10:28 +0100
committerPierre Ossman <ossman@cendio.se>2019-03-26 11:10:28 +0100
commit78bdd1700c4e42b492286a2af25bea0825848f99 (patch)
tree626bb4c6135e35b48157eb5b1312cef3d687a046 /common/rfb
parent26cd3329413872647c288e4a0f237c70a342248b (diff)
downloadtigervnc-78bdd1700c4e42b492286a2af25bea0825848f99.tar.gz
tigervnc-78bdd1700c4e42b492286a2af25bea0825848f99.zip
Add missing throws for exception
It is not enough to create an exception object, you need to throw it as well.
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/CSecurityTLS.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index c6d1e310..aa191090 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -391,7 +391,7 @@ void CSecurityTLS::checkSession()
"authority:\n\n%s\n\nDo you want to save it and "
"continue?\n ", info.data);
if (len < 0)
- AuthFailureException("certificate decoding error");
+ throw AuthFailureException("certificate decoding error");
vlog.debug("%s", info.data);
@@ -417,16 +417,16 @@ void CSecurityTLS::checkSession()
if (gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, NULL, &out_size)
== GNUTLS_E_SHORT_MEMORY_BUFFER)
- AuthFailureException("Out of memory");
+ throw AuthFailureException("Out of memory");
// Save cert
out_buf = new char[out_size];
if (out_buf == NULL)
- AuthFailureException("Out of memory");
+ throw AuthFailureException("Out of memory");
if (gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, out_buf, &out_size) < 0)
- AuthFailureException("certificate issuer unknown, and certificate "
- "export failed");
+ throw AuthFailureException("certificate issuer unknown, and certificate "
+ "export failed");
char *homeDir = NULL;
if (getvnchomedir(&homeDir) == -1)