From a64a16dba31b00983aec4ae0c9460c6779885b95 Mon Sep 17 00:00:00 2001 From: Paul Fenwick Date: Wed, 22 Apr 2015 13:14:02 +1000 Subject: [PATCH] Have CurlMulti.InfoRead() fail when unimplemented. This simply throws an exception if we can't complete the user's request, making it very obvious that what they've tried is not going to work. Closes #9. --- CurlSharp/CurlMulti.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CurlSharp/CurlMulti.cs b/CurlSharp/CurlMulti.cs index dc5f8b3..d2f7dfd 100644 --- a/CurlSharp/CurlMulti.cs +++ b/CurlSharp/CurlMulti.cs @@ -253,7 +253,8 @@ public int Select(int timeoutMillis) } /// - /// Obtain status information for a CurlMulti transfer. + /// Obtain status information for a CurlMulti transfer. Requires + /// CurlSharp be compiled with the libcurlshim helper. /// /// /// An array of objects, one for each @@ -285,8 +286,17 @@ public CurlMultiInfo[] InfoRead() } NativeMethods.curl_shim_multi_info_free(pInfo); } -#endif + return _multiInfo; + +#else + + throw new NotImplementedException( + "Sorry, CurlMulti.InfoRead is not implemented on this system." + ); + +#endif + } } -} \ No newline at end of file +}