catch {your command} err errdict
dict get $errdict -errorinfo
dict get $errdict -errorstack
There should be some context, where this is called.
On 10-Mar-2023 17:06, Harald Oehlmann wrote:
catch {your command} err errdict
dict get $errdict -errorinfo
dict get $errdict -errorstack
There should be some context, where this is called.
You'd expect so, wouldn't you?
In practice, both [dict get] commands fail with "key ... not known in dictionary. The error dictionary is simply
-code 7 -level 0
As I said in my original post, I'm principally interested in how reolve
the error by getting hold of a copy of crypt.dll.
While I could apparently work around the problem by sending the body
part as either text/plain or text/html rather than both, the full use
case also includes sending a couple of files as attachments, and that
fails with the "cannot open crypt.dll" error.
I don't think I've supplied the package versions; I'm using smtp 1.15.1
and mime 1.7.0
The error occurs in the call to sendmessageaux from sendmessage at
approx line 323 (it's hard to be precise, because I've added some trace)
just before the comment "Send the message to bcc recipients as a MIME attachment".
Within sendmessageaux, there is an error in the call to wtext at around
line 38, after the loop around all the recipients.
Within wtext, an error - "cannot open crypt.dll"! - is returned by the
call to wtextaux a little over halfway through, just after sending "300
DATA" and checking for a 354 response.
Within wtextaux, there is a comment about working around "a bug with
stacking channels on top of TLS". The code immediately after this sets
trf to 0 because the tls entry exists in the state array and has value
1. Because of this, we call mime::buildmessage rather than
mime::copymessage. mime::buildmessage returns an error.
Within buildmessage, the error is returned by the call to
buildmessageaux almost at the top of the proc. This proc is called via
set code [catch {mime::buildmessageaux $token} result]
and at this point, errorInfo has the value
cannot open crypt.dll
while executing
"md5 -- $key"
(procedure "getContentType" line 15)
invoked from within
"getContentType $token"
(procedure "getheader" line 20)
invoked from within
"getheader $token"
(procedure "copymessageaux" line 11)
invoked from within
"copymessageaux $token $chan"
(procedure "mime::buildmessageaux" line 4)
invoked from within
"mime::buildmessageaux $token""
code: "1", result: "cannot open crypt.dll"
I'm really not sure that it will help for me to dive any deeper into the code.
Am 11.03.2023 um 14:56 schrieb Alan Grunwald:
I'm really not sure that it will help for me to dive any deeper into
the code.
Ok. The man-page of the md5 command gives some insight:
https://tmml.sourceforge.net/doc/tcllib/md5.html
It is perhaps a failed critcl compile run?
It's Windows. Installation is sufficiently effort free that I don't
remember where I got the tcl installation from. I see that it's
installed in C:\ActiveTcl, which I guess provides quite a clue! I'm
fairly sure that I haven't built the tcllibc package. Nor do I,
knowingly, have cryptkit or Trf. How can I check for tcllibc, cryptkit
and Trf?
I've assumed up to now that I have some package or other missing, which
would provide crypt.dll; you seem to be suggesting that there may be a problem with the way that the md5 command determines what sort of installation I have.
I shall dive back into the code!
(By the way, I have not mentioned up to now that the code works fine on Linux.)
Am 12.03.2023 um 14:09 schrieb Alan Grunwald:
It's Windows. Installation is sufficiently effort free that I don't
remember where I got the tcl installation from. I see that it's
installed in C:\ActiveTcl, which I guess provides quite a clue! I'm
fairly sure that I haven't built the tcllibc package. Nor do I,
knowingly, have cryptkit or Trf. How can I check for tcllibc, cryptkit
and Trf?
I've assumed up to now that I have some package or other missing,
which would provide crypt.dll; you seem to be suggesting that there
may be a problem with the way that the md5 command determines what
sort of installation I have.
I shall dive back into the code!
(By the way, I have not mentioned up to now that the code works fine
on Linux.)
I am also on Windows. I never used critcl. It is a library, which
creates dll files on the fly. That is great but fragile.
I suggest to switch to the more recent TCL distribution by Ashok (Magicsplat). To my knowledge, ActiveState TCL is not maintained any more.
Take care,
Harald
2) I was mistaken; I apologise. Now that the code is working, I find
that I am *very* interested in knowing why it failed. (Principally
because I am used to the way ActiveTcl is installed and lays out its
files; rather than learn how Ashok lays out the files for Magicsplat, I
would build Tcl from sources myself on Windows, and I'd rather not do
that, so I'm prepared to put some effort into fixing the unsupported ActiveTcl installation.)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (3 / 13) |
Uptime: | 54:04:26 |
Calls: | 6,914 |
Calls today: | 4 |
Files: | 12,379 |
Messages: | 5,430,312 |