Set the appropriate AsyncSocketExceptionType from SSLException
authorNeel Goyal <ngoyal@fb.com>
Mon, 2 May 2016 16:30:18 +0000 (09:30 -0700)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Mon, 2 May 2016 16:35:33 +0000 (09:35 -0700)
commita0a4a68dc876804f283131b5394610c556b67547
tree1bf26cff232aa8edc45a4c3e824f6f8344d27666
parentad8a8cb578822886334c3fb38141a2419f4bed1a
Set the appropriate AsyncSocketExceptionType from SSLException

Summary:
We should use the appropriate AsyncSocketExceptionType when firing SSLExceptions.  This derives the type from the constructor args, and introduces a `NETWORK_ERROR` exception type.  Open to suggestions on reusing something there.

Additionally, rename getType() to getSSLError() to prevent hiding the AsyncSocketException::getType.

Reviewed By: siyengar

Differential Revision: D3241204

fb-gh-sync-id: de631dfb3554177d5bd561f4b91e767c882767d3
fbshipit-source-id: de631dfb3554177d5bd561f4b91e767c882767d3
folly/io/async/AsyncSocketException.h
folly/io/async/ssl/SSLErrors.cpp
folly/io/async/ssl/SSLErrors.h
folly/io/async/test/AsyncSocketExceptionTest.cpp