login about faq

I'm using the C++ HTTP component to download files from a HTTP server. I see that the CkHttp::lastErrorText() gives a commendably detailed error message, but it is too long and detailed for me to present to the user in our UI. Is there an easy way to get a one line error description instead, for example "ConnectFailReason: Connection Rejected" ?

asked May 26 '14 at 00:13

Jarl's gravatar image


edited May 26 '14 at 00:13

The LastErrorText is intended to provide information for the application developer to resolve problems quickly. It's not designed for viewing by the non-technical end-user of an app.

Unfortunately, it's not so easy to decide internally within Chilkat as to what the one-line error would be. Chilkat will be investigating ways of choosing what one-line error is best, but I suspect even with that, it will end up being an uninformative error that basically amounts to knowing that the particular Chilkat method call failed and you'd need to look at the full detail of the LastErrorText to get proper context and details about what transpired.


answered May 28 '14 at 11:54

chilkat's gravatar image

chilkat ♦♦

I think most of the time just handing back the last error will do. "Connection refused" is pretty informative, as is "404 Not Found", or "Certificate validation failed" etc . I'm happy to log LastErrorText somewhere as well, and refer to that in case the user finds the one line error insufficient.


answered May 29 '14 at 20:33

Jarl's gravatar image


This feature is important for us, too.

I think, to add the function get_ConnectFailReason(), like in CkSocket or CkFtp2, would be a good first step. The same think in CkMailMan.


answered Jun 04 '14 at 05:32

serras's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 26 '14 at 00:13

Seen: 2,363 times

Last updated: Jun 04 '14 at 05:32

powered by OSQA