From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 37480@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15691609284091 (code B ref -1); Sun, 22 Sep 2019 14:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Sep 2019 14:02:08 +0000 Received: from localhost ([127.0.0.1]:34310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC2RD-00013u-7e for submit@debbugs.gnu.org; Sun, 22 Sep 2019 10:02:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:45369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC2RA-00013f-JU for submit@debbugs.gnu.org; Sun, 22 Sep 2019 10:02:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38909) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC2R7-0000MP-J9 for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:02:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC2R4-0000bm-Sh for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:02:01 -0400 Received: from cvj.se ([31.192.230.63]:33675) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iC2R4-0000H3-4H for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:01:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID:From:Subject:To; bh=B+QFaWaFZq9aFB8mKsUgMRe21Ia8zvCu71eNxj350k0=; b=nCeVx+TSvnEq53QZ1p9wlm4en+xYAPC8dAsC/9l3sbLwgf04zZHxex7fIGCbYuelX8+jhVnfE6eW33YH0GR/8Blr90IJZxLouZLPu7XGQMX2yfgbE+bpMb+xE/0pTdqpw1zRkVTypMbkL2/nM2RlUn+RohIvHpGQSTtF0Ej+q7Q=; Received: from m77-218-254-250.cust.tele2.se ([77.218.254.250] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1iC2Pu-0003Rd-0K for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 16:00:47 +0200 From: Christian Johansson Message-ID: Date: Sun, 22 Sep 2019 16:00:38 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.192.230.63 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) I want to handle errors occurring in asynchronous threads like in this example, is it possible? (make-thread (lambda() (message "Start of asynchronous thread") (signal 'error '("Fatal error")) (message "End of asynchronous thread"))) In GNU Emacs 27.0.50 (build 5, x86_64-apple-darwin18.5.0, NS appkit-1671.40 Version 10.14.4 (Build 18E226)) of 2019-07-12 built on Christians-MacBook-Air.local Repository revision: 8179cbff9ed37e7d8892643859adfad448ae1c7a Repository branch: master Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.4 Recent messages: Mark activated Auto-saving...done Quit Saving file /Users/christianjohansson/Documents/ownCloud/Mediastrategi/async.el... Wrote /Users/christianjohansson/Documents/ownCloud/Mediastrategi/async.el Quit previous-line: Beginning of buffer Mark set M-g C-g is undefined Quit Quit Configured features: RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS PDUMPER GMP Important settings: value of $LANG: en_SE.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: global-hl-todo-mode: t hl-todo-mode: t flycheck-color-mode-line-mode: t show-paren-mode: t save-place-mode: t global-diff-hl-mode: t diff-hl-mode: t ssh-deploy-line-mode: t global-auto-complete-mode: t global-hl-line-mode: t flyspell-mode: t editorconfig-mode: t which-key-mode: t csv-field-index-mode: t global-flycheck-mode: t flycheck-mode: t async-bytecomp-package-mode: t yas-global-mode: t yas-minor-mode: t override-global-mode: t ido-everywhere: t display-time-mode: t winner-mode: t electric-pair-mode: t recentf-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-idle-summary-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t global-semantic-stickyfunc-mode: t global-semantic-show-parser-state-mode: t global-semantic-show-unmatched-syntax-mode: t global-semantic-highlight-edits-mode: t semantic-mode: t delete-selection-mode: t display-battery-mode: t global-whitespace-mode: t which-function-mode: t shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t transient-mark-mode: t Load-path shadows: /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-functions hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-functions /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-tags hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-tags /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-lexer hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-lexer /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-macros hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-macros /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-semantic hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-semantic /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-automation hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-automation /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-syntax-table hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-syntax-table /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-flymake hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-flymake /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode hides /Users/christianjohansson/.emacs.d/phps-mode/phps-mode /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-test-functions hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-test-functions /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-functions hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-functions /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-tags hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-tags /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-test-integration hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-test-integration /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-lexer hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-lexer /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-test-parser hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-test-parser /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-macros hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-macros /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-test-lexer hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-test-lexer /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-semantic hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-semantic /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-autoloads hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-autoloads /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-automation hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-automation /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-syntax-table hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-syntax-table /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-flymake hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-flymake /Users/christianjohansson/.emacs.d/phps-mode/phps-mode-test-syntax-table hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-test-syntax-table /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode-pkg hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode-pkg /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190918.701/phps-mode hides /Users/christianjohansson/.emacs.d/elpa/phps-mode-20190916.1730/phps-mode /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20181106.1347/ssh-deploy /Users/christianjohansson/.emacs.d/ssh-deploy/ssh-deploy-diff-mode hides /Users/christianjohansson/.emacs.d/elpa/ssh-deploy-20181106.1347/ssh-deploy-diff-mode /Users/christianjohansson/.emacs.d/elpa/less-css-mode-20161001.453/less-css-mode hides /Applications/Emacs.app/Contents/Resources/lisp/textmodes/less-css-mode /Applications/Emacs.app/Contents/Resources/lisp/progmodes/mantemp hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/mantemp Features: (shadow mail-extr emacsbug sendmail help-fns cl-print debug two-column iso-transl phps-mode-tags phps-mode-syntax-table phps-mode-semantic phps-mode-functions phps-mode-flymake semantic/doc phps-mode-lexer phps-mode-macros semantic/wisent semantic/wisent/wisent names edebug backtrace tar-mode arc-mode archive-mode view package-recipe-mode package-build-badges package-build package-recipe vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader org-docview org-bibtex bibtex org-bbdb org-w3m editorconfig-core editorconfig-core-handle editorconfig-fnmatch display-line-numbers rainbow-mode hl-todo flycheck-rust flycheck-color-mode-line face-remap cus-edit cus-start cus-load init rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap smartparens-html sgml-mode dom nxml-util nxml-enc xmltok misc ts-comint tss log4e helm helm-source helm-multi-match helm-lib json-mode json-reformat json-snatcher tide tide-lv typescript-mode zenburn-theme smarty-mode paren saveplace mm-archive message rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs text-property-search mailabbrev gmm-utils mailheader gnutls network-stream url-cache restclient shackle trace smex flycheck-pos-tip pos-tip diff-hl vc-dir ewoc vc vc-dispatcher diff-mode exec-path-from-shell ssh-deploy-hydra ssh-deploy emacs-wisent-grammar-converter nginx-mode ac-html ac-html-core auto-complete-config auto-complete popup ztree ztree-diff ztree-diff-model ztree-dir ztree-view ztree-util gulp-task-runner grunt powerline powerline-separators powerline-themes phpcbf php-auto-yasnippets php-mode php-project add-log cc-langs web-beautify w3m doc-view jka-compr dired dired-loaddefs image-mode timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util hydra lv imenu-list hl-line auto-dictionary flyspell ispell editorconfig ansible-doc org-jira org-jira-sdk jiralib request mail-utils soap-client mm-decode mm-bodies mm-encode url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc puny rng-xsd rng-dt rng-util xsd-regexp xml org-clock org-element avl-tree smartparens-org org org-macro org-footnote org-pcomplete org-list org-faces org-entities time-date org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs ecb ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload radix-tree ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper ecb-semantic ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout ecb-compilation ecb-common-browser speedbar sb-image dframe ecb-navigate eieio-compat ecb-mode-line ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-find semantic/db-ref ecb-util which-key csv-mode sort flycheck-package package-lint finder finder-inf lisp-mnt flycheck flymake-rust flymake-easy flymake-proc flymake warnings rust-playground time-stamp cargo cargo-process smartparens-markdown markdown-mode color noutline outline smartparens-rust rust-mode image+ image-file google-translate google-translate-default-ui google-translate-core-ui google-translate-core google-translate-tk url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap lorem-ipsum darktooth-theme autothemer smartparens-config smartparens-javascript smartparens-text smartparens paredit ripgrep thingatpt grep compile minimap skewer-mode cache-table js2-mode etags fileloop generator xref project js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs simple-httpd pp url-util doom-themes doom-themes-common base16-theme dracula-theme with-editor async-bytecomp async server yasnippet yaxception ht dash know-your-http-well http-status-codes http-relations http-methods http-headers s use-package up-delight up-diminish up-ensure up-core pcase cl bind-key easy-mmode ido time winner elec-pair desktop frameset recentf tree-widget wid-edit semantic/mru-bookmark semantic/db-mode semantic/idle semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn semantic/db eieio-base semantic/format ezimage semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local find-func cedet edmacro kmacro delsel battery disp-table whitespace which-func imenu windmove tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time ls-lisp format-spec wombat-theme rx cl-extra help-mode advice info package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 752194 242623) (symbols 48 61091 23) (strings 32 234066 45399) (string-bytes 1 7200853) (vectors 16 92145) (vector-slots 8 1768635 188454) (floats 8 768 1432) (intervals 56 5603 3108) (buffers 992 34)) -- Hälsningar / Best Regards Christian From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.15691638278799 (code B ref 37480); Sun, 22 Sep 2019 14:51:01 +0000 Received: (at 37480) by debbugs.gnu.org; 22 Sep 2019 14:50:27 +0000 Received: from localhost ([127.0.0.1]:34328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3Bz-0002Hr-IU for submit@debbugs.gnu.org; Sun, 22 Sep 2019 10:50:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3Bx-0002Hf-Mf for 37480@debbugs.gnu.org; Sun, 22 Sep 2019 10:50:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC3Bq-0002m9-9J; Sun, 22 Sep 2019 10:50:18 -0400 Received: from [176.228.60.248] (port=4742 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC3Bn-0003Ma-5R; Sun, 22 Sep 2019 10:50:16 -0400 Date: Sun, 22 Sep 2019 17:50:25 +0300 Message-Id: <838sqgqtam.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Christian Johansson on Sun, 22 Sep 2019 16:00:38 +0200) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Christian Johansson > Date: Sun, 22 Sep 2019 16:00:38 +0200 > > I want to handle errors occurring in asynchronous threads like in this > example, is it possible? For some value of "possible". From the ELisp manual: When code run by a thread signals an error that is unhandled, the thread exits. Other threads can access the error form which caused the thread to exit using the following function. -- Function: thread-last-error This function returns the last error form recorded when a thread exited due to an error. Each thread that exits abnormally overwrites the form stored by the previous thread’s error with a new value, so only the last one can be accessed. > (make-thread > (lambda() > (message "Start of asynchronous thread") > (signal 'error '("Fatal error")) > (message "End of asynchronous thread"))) I'm not sure I understand what you tried to accomplish with this code. It doesn't seem to handle errors in any way. Could you explain what you are trying to do? From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156916599412323 (code B ref 37480); Sun, 22 Sep 2019 15:27:02 +0000 Received: (at 37480) by debbugs.gnu.org; 22 Sep 2019 15:26:34 +0000 Received: from localhost ([127.0.0.1]:34343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3kv-0003Ch-Nj for submit@debbugs.gnu.org; Sun, 22 Sep 2019 11:26:33 -0400 Received: from cvj.se ([31.192.230.63]:48716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3kt-0003CY-Rj for 37480@debbugs.gnu.org; Sun, 22 Sep 2019 11:26:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=vgA2uUXCMxUy9tQCgL86ohfX0xOiLIzyaCfQPgCMPMg=; b=A6x6EYGeuLzOS8aq7coNu+DCEB08bpyXXHWSaoXngA0kJ9o9v8gg9WZ0YF9yFA4M1c0kMBQp7YmnwRsO9ghESxxja4hnqZovUTrPEknzmwatXBgH7aephtY9k05kgr048iNOU1+pY4wU5rB8vMsD7nz1DIpgDRkATrgLoS5Ezsg=; Received: from c-2f5ee255.011-155-65736b4.bbcust.telenor.se ([85.226.94.47] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1iC3kr-0002pg-TL; Sun, 22 Sep 2019 17:26:30 +0200 References: <838sqgqtam.fsf@gnu.org> From: Christian Johansson Message-ID: Date: Sun, 22 Sep 2019 17:26:28 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <838sqgqtam.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi! Alright, I would like to do something like this: (condition-case     nil     (make-thread      (lambda()        (message "Start of asynchronous thread")        (signal 'error '("Fatal error"))        (message "End of asynchronous thread")))   (message "Catched error")) I have a case were a error occurs inside a tramp thread and I would like to be able to handle it Hälsningar / Best Regards Christian On 2019-09-22 16:50, Eli Zaretskii wrote: >> From: Christian Johansson >> Date: Sun, 22 Sep 2019 16:00:38 +0200 >> >> I want to handle errors occurring in asynchronous threads like in this >> example, is it possible? > For some value of "possible". From the ELisp manual: > > When code run by a thread signals an error that is unhandled, the > thread exits. Other threads can access the error form which caused the > thread to exit using the following function. > > -- Function: thread-last-error > This function returns the last error form recorded when a thread > exited due to an error. Each thread that exits abnormally > overwrites the form stored by the previous thread’s error with a > new value, so only the last one can be accessed. > >> (make-thread >> (lambda() >> (message "Start of asynchronous thread") >> (signal 'error '("Fatal error")) >> (message "End of asynchronous thread"))) > I'm not sure I understand what you tried to accomplish with this code. > It doesn't seem to handle errors in any way. Could you explain what > you are trying to do? From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156916676013676 (code B ref 37480); Sun, 22 Sep 2019 15:40:01 +0000 Received: (at 37480) by debbugs.gnu.org; 22 Sep 2019 15:39:20 +0000 Received: from localhost ([127.0.0.1]:34351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3xH-0003YW-UC for submit@debbugs.gnu.org; Sun, 22 Sep 2019 11:39:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3xG-0003YH-Ep for 37480@debbugs.gnu.org; Sun, 22 Sep 2019 11:39:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC3xB-0007vD-A6; Sun, 22 Sep 2019 11:39:13 -0400 Received: from [176.228.60.248] (port=3795 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC3xA-0006no-Po; Sun, 22 Sep 2019 11:39:13 -0400 Date: Sun, 22 Sep 2019 18:39:23 +0300 Message-Id: <8336goqr10.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Christian Johansson on Sun, 22 Sep 2019 17:26:28 +0200) References: <838sqgqtam.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 37480@debbugs.gnu.org > From: Christian Johansson > Date: Sun, 22 Sep 2019 17:26:28 +0200 > > (condition-case >     nil >     (make-thread >      (lambda() >        (message "Start of asynchronous thread") >        (signal 'error '("Fatal error")) >        (message "End of asynchronous thread"))) >   (message "Catched error")) > > I have a case were a error occurs inside a tramp thread and I would like > to be able to handle it You don't need condition-case in this case, you just need to examine the value of thread-last-error when the thread exits. Alternatively, you could try making the thread you start signal the main thread, then the main thread should be able to catch that error. In general, errors are thread-local, so you cannot catch an error signaled in another thread. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 37480@debbugs.gnu.org, Eli Zaretskii Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156917119822203 (code B ref 37480); Sun, 22 Sep 2019 16:54:01 +0000 Received: (at 37480) by debbugs.gnu.org; 22 Sep 2019 16:53:18 +0000 Received: from localhost ([127.0.0.1]:34434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC56s-0005m2-AE for submit@debbugs.gnu.org; Sun, 22 Sep 2019 12:53:18 -0400 Received: from mout.gmx.net ([212.227.17.20]:55249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC56q-0005lk-GO for 37480@debbugs.gnu.org; Sun, 22 Sep 2019 12:53:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1569171185; bh=OVx/GgsBOlTyBu3GEedmBhJ5ZNxomniYa1PIXlVi3YA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=k3ugztGdqZ8BXC4hbDS7BGx5k7G8Xdu1prKZiGDU8AhU/ibTYM9qz1iG0TmLS2LdT CZbdR7NBVDcJNru33McXIRukyTrJ7slV//bvGDLe+fSTkT2ckN8JrxdOX2uNvP7Z6m JiN+/bh4j55ZQIthxysbIoo4UXhswHuXKB5XzoIk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([213.220.156.17]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MryTF-1hoY7A0rrB-00nvjx; Sun, 22 Sep 2019 18:53:05 +0200 From: Michael Albinus References: <838sqgqtam.fsf@gnu.org> Date: Sun, 22 Sep 2019 18:53:00 +0200 In-Reply-To: (Christian Johansson's message of "Sun, 22 Sep 2019 17:26:28 +0200") Message-ID: <87v9tkmfwz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:AvmNIL4zyKCZvUU5PTGZbgIwDT5TvpOq1Rq0aoLpag2CpszHV3Y lT5wvJ2lyB6NzulZqLkiijjm4iEeKbso9vbGHjY5K5K/YjRgvbKWt/SXX64Z0J+WMC9u9y/ QjtwiE3VwWYrTwjHBLyWJnAq+nCmCr0PKZ6ArZTQERl4aLzcrreULLXvzkTJHwe4y71w3Rs HFxO4xahaeP3NrV4ZKnSw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:dnPB43o6s3I=:ndotIGYenNQmlfXVuwl0aU lnM6Ik0phaEerYrBf4Tkzuxc3gP9eXRtyun/Wgfk1ZGjChjJbHk6NZG7n2VYk9VH3sgkdYqEu sgSCdoe8i3lHDM31mi/Gd3Km78ADVOpjwcO0GK8kOoVXHQVAXJJm9+uIWfqwqkaIk1v867fdj SOjy5J+zQ7FINfEJb/lLxVjpx9ScgBUy170+eEMa4/ETZafXgng4+OHGa94+sE9zw3U8hjrTs iMAShLefLFUMw1LNOfN6vMT4Of9N/0abcJuAPhJ9i6TrgifiKAZl9liOWkFtMreJpI4wI0kri RDYXF81iQHLQUG33sFrlttKHvklhzdhK4d+j3yZBX5p7RqjRMP8v0ytp4qqa6QuS4DSKRy42V iABlg8r5sfEnjNII9AsoeI7G8WxgXjOv5B1ongOOqOJk5plS0Sjc8n+6Xka8lwA00I+ZpLaxp X0SJOvuY6/qMO1U6aEQuA2vAqi2s2ARQzhWiFAlDEr63OELSQt8B49d19kb0l2SH4dfdQuGXV LbRexUHMaGUC7tMDeWtC1kHjkkqfCiFKKmUYrdbAp+XI1RknmvZAaihgGB1yl+l71Wjebb/OU 5p5QJgWZz1UPCgCDxYu3UUQloqLvMneQyJJ3UTylE78c7SdAnOEljmK13SfM79n01OfdDzOiF lVE9pnrWIHyczs+2/sy0iArAhv7/wKxcSeV7fvkQHUaJMa45fJwJnSloxbOHL/GWQcp+YTaCF wW06ZGYt94MoMIb3UfD8LMNqbMb57Pyl6kZo0EG1/68chqltp6W+7VfNtY02ZWGOfMsdlPLo2 iaw1toU8yjq6vKZSkXV5v9qclWnwCuww4JWDePSFdcXx6FjI+m7YQyEcPdf9tpwwoZWWyMynK BNUWpo0R0i3CdIksb6RqTfSRc2eY3FCmIlVeBD4xUstuWlx0LVvv0kt8E2Lp8y02xprdUXrFI MvOOlEz1qTLbLjQHoYNMGsKQzeDJXfZ9b96IhJCGvsmlI0MQupBntn74zrXSrMQY16CtJyI22 M+JOWN/9MAfSHdAMIY+154tmni1c+SEZRZN9GlgQZ/SJZXw2EQ+rJWyVx0bAaTOkDu1YOUSCr EqglNTzTSAYrhIIYi3TtB+kpeF4kEfPeKNUp58pdQtEyS04LnSNLeJqHL8QQH/uSq5o1JpA/t /imeo7EdPWfoco6oCg3W1AqqE5IqIILdbjtLwfpkEyPrciBYPqIlHmflwCzdRzaZv4HtbVCjZ TlQQEfDdODbKJbLyFs/VHoDDE/0yhYXX/vF4DU0SA/bDZz0XGuvVZEHPWML4= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Christian Johansson writes: > Hi! Hi Christian, > I have a case were a error occurs inside a tramp thread and I would > like to be able to handle it Could you give more details on the error inside a tramp thread? I'm interested in. Furthermore, Tramp in its own repository (not Emacs master) has more support for threads. This includes better reports about errors inside threads. Hmm, maybe I shall sync this with the feature/tramp-thread-safe branch ... > H=C3=A4lsningar / Best Regards > Christian Best regards, Michael. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2019 05:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156921591818786 (code B ref 37480); Mon, 23 Sep 2019 05:19:01 +0000 Received: (at 37480) by debbugs.gnu.org; 23 Sep 2019 05:18:38 +0000 Received: from localhost ([127.0.0.1]:34887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCGkA-0004sv-9v for submit@debbugs.gnu.org; Mon, 23 Sep 2019 01:18:38 -0400 Received: from cvj.se ([31.192.230.63]:39794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCGk7-0004sk-LD for 37480@debbugs.gnu.org; Mon, 23 Sep 2019 01:18:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=aokG/ScZwFRR9ytPmotpc0rklVjfvuqzJxeyUCr7abU=; b=QJNAN4dhcY79Q41F/sOpFqCeRQxMRkRPKs3Gz+RONTWExoyakHiMUXduCqjjiD3jQ8hc8/z62rrKwUFscR6a16V6tbU2cF3fX5+zbARGu7X49jUqVvVExsJp/+H7yK95nQp+jjql5iw9y/ScSE89Kc2m03DWrBKsweUVHYeTDX0=; Received: from m83-185-88-226.cust.tele2.se ([83.185.88.226] helo=Christians-MacBook-Air.local) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1iCGk5-00052R-Du; Mon, 23 Sep 2019 07:18:33 +0200 References: <838sqgqtam.fsf@gnu.org> <8336goqr10.fsf@gnu.org> From: Christian Johansson Message-ID: <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> Date: Mon, 23 Sep 2019 07:18:25 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <8336goqr10.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Alright, I didn't know about that function. Can you give an example of how to use it? It tried the following but it doesn't work, it seems the thread dies after the signal and I'm not sure were it exits. (make-thread  (lambda()    (message "Start of asynchronous thread")    (signal 'error '("Fatal error"))    (message "End of asynchronous thread")    (message "Last error %s" (thread-last-error)))) For my ssh-deploy plugin, sometimes a asynchronous process or thread gets an error, could be network issues for instance and I would like to be able to handle these cases. I'm trying to make sure there is only one asynchronous process or thread simultaneously related to a local file, this is to avoid race conditions that otherwise occur with my plugin, especially when on a bad connection. I would be interested in exploring how to signal the main thread from the created thread, where can I read more about that? Hälsningar / Best Regards Christian On 2019-09-22 17:39, Eli Zaretskii wrote: >> Cc: 37480@debbugs.gnu.org >> From: Christian Johansson >> Date: Sun, 22 Sep 2019 17:26:28 +0200 >> >> (condition-case >>     nil >>     (make-thread >>      (lambda() >>        (message "Start of asynchronous thread") >>        (signal 'error '("Fatal error")) >>        (message "End of asynchronous thread"))) >>   (message "Catched error")) >> >> I have a case were a error occurs inside a tramp thread and I would like >> to be able to handle it > You don't need condition-case in this case, you just need to examine > the value of thread-last-error when the thread exits. > > Alternatively, you could try making the thread you start signal the > main thread, then the main thread should be able to catch that error. > > In general, errors are thread-local, so you cannot catch an error > signaled in another thread. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2019 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 37480@debbugs.gnu.org, Eli Zaretskii Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156922290429877 (code B ref 37480); Mon, 23 Sep 2019 07:16:01 +0000 Received: (at 37480) by debbugs.gnu.org; 23 Sep 2019 07:15:04 +0000 Received: from localhost ([127.0.0.1]:34957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCIYq-0007lp-GL for submit@debbugs.gnu.org; Mon, 23 Sep 2019 03:15:04 -0400 Received: from mout.gmx.net ([212.227.15.18]:37583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCIYo-0007l1-Je for 37480@debbugs.gnu.org; Mon, 23 Sep 2019 03:15:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1569222893; bh=AdbBK8ss7zivCMkYjmgfyjUpfrrmZQcb0PDwenVvQ6A=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=XuXFLz1Hio3MWv8VUYllthDrajLqjIopuPiZUef5dV/WhwiFCcD15Y/EbaWz75edl B9MEjkUC6QJPvpGeyFd+ShKOztj7KxbBNcR8BiFs6IEa7Xm57plOnWaE4uz7eEiB+z HmXAjv1AmE3eeRNJkaOO/VWZCOCrQuvThhXKjVkw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.91.242.124]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mr9Bk-1hs2d12IMg-00oCs9; Mon, 23 Sep 2019 09:14:53 +0200 From: Michael Albinus References: <838sqgqtam.fsf@gnu.org> <8336goqr10.fsf@gnu.org> <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> Date: Mon, 23 Sep 2019 09:14:51 +0200 In-Reply-To: <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> (Christian Johansson's message of "Mon, 23 Sep 2019 07:18:25 +0200") Message-ID: <87pnjrmql0.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Qsr65Vl9JR7PT60QDfm8vM8PR0s5xHb6Hx9JPXiCp8fv15noR98 w47TM5+xFkHDxakLpnzSyBxf9O35x46iZQwu4gHWif2wstmbWWT8/r95zX6GNEHyEcIP+wX 92QdrJ8Msz/kknBk5nK6aWXHsapoJFcAXulTeNgROAPUyq7jxz/ilBTBAbyJOrVCEKLky9+ VYNKq4eF4ut358C5kHsCA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qiwVtRHMGbI=:7wLwVj//oap+XvNfc8wmGt B9acsCBR2UdoZguftTuackg/xg3ItcO6/BDP6g8n5AQh+fRJ9RBi6vwqHRmay0zawwy1CEoPs uECaJFnBQolZ+QXSBOiUTyYl8vcroZ3s/9W3HQ6h+sQMiOcp/clxhGqi0BQwntI4Sv+KQRFvU oHSlVeXUTEmBiRHGmQ3qJnY6nWv+hJ4RRx2DOX2ttkmr+7xrCM7C5gQoR/6/oSEZDeX6neBkB IXigSds6DFRbfxpNgZxwSD9tgga7UqYwDvAFyoWYFlM1ipLL306O2QAk9RFDXXVhICFU1eaNs cavz7TE/JCx7P74UHXbeYqoX67GnRTnOMfmJB0fUC0bhFGx7WeD6PfiTRvAx4EPvV9ZuZXbU5 2lARrqKhwqVBZhrQmX9jq8Df+JEECFAC5g4ksixF6+zPpK9D9iFzUNtQpXpdzTT3sYSuzyWOi RE1140C73++1nNSIrlOnLtrSRi7fEA9wI7Cw5rIIXLbxEYD2rczldrmGpa2gpQ8TwDpGE/BvZ 6Zw5cEHqv1zCANwBTejBxZe17GhHwn7pb8S99C68QxEcZnAFQYutbJSvfnlijOsXj8hsJoAcG b5rk3Z+Y63p/kF0iKNZUk/geAlf01cmNePjOWou6E/8BN9lnLyJ1T2zxy37teOfL6WaIfrBz0 A/WEnIWN5jOwqhIl8vzWBsPaOAQRMsAt67Ex36WhpFLbeqo8h/xrbNAdcCGHrj1zWaI5+YuIo uk0sGq8UUuCDvNgdinpApffTi25p8CJF50QfO/tyQr4BqkZUTNskWQifqKRc2pLb67ilnEOsc /nL0VG9ykYlHb0NbhndQ6/+w5x0Cs6ZxFs4hmGtLaNfVX4zPukhxm2A8Sbw8f1KcH9+woLZ0b Qt1bcFnXreJst3qt/Z0VhUEtMi6urINs+9lfwyrVOnuYYpPqiUd7T6284eYlr/sQUBWIt47HT v/NAy74I2hqcETwSXwcQHCSw2HqPtnCqWNlYgCnacD/DWwJ/HQDn6WyJ9g4BqBFE+X1yT7/DD 861zW/+B9rzWIFKF00iAPHIEPBVoTiGd7vL8R1xVXwxtgIL9Q500gsZOQHz1clo0VMgEaU3sk FVSzubsdZXVIJlOBjC/nbwuqV9m+Mg6biuxxaWmWA8zDQDzx9LU72Et+vlzyuPCrATvzeDiMg Mr0hgLWuIYePyt7SZzakxh50a3LBNCfoO4l48eXBCgJJWdJ/NgF+vLRxx6pQXqFNvnr5BCIwT Qt8UdzJY8xIEVkO8OflNdGi5QKOSvHayGbrWPOqT91crsIeB/6CCND1vghNI= X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Christian Johansson writes: > Hi Hi Christian, > Alright, I didn't know about that function. Can you give an example of > how to use it? See .../test/src/thread-tests.el, function threads-errors. > I would be interested in exploring how to signal the main thread from > the created thread, where can I read more about that? thread-signal does NOT raise an error if the target thread is the main thread. You see just the message. See .../test/src/thread-tests.el, function threads-signal-main-thread. If you want a signal to be propagated to the main thread, you must organise differently. For example checking thread-last-error, when the main thread gets control. > H=C3=A4lsningar / Best Regards > Christian Best regards, Michael. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Sep 2019 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christian Johansson Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156925668912353 (code B ref 37480); Mon, 23 Sep 2019 16:39:01 +0000 Received: (at 37480) by debbugs.gnu.org; 23 Sep 2019 16:38:09 +0000 Received: from localhost ([127.0.0.1]:36919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCRLl-0003DB-El for submit@debbugs.gnu.org; Mon, 23 Sep 2019 12:38:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCRLj-0003CR-O9 for 37480@debbugs.gnu.org; Mon, 23 Sep 2019 12:38:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iCRLe-0003OY-5F; Mon, 23 Sep 2019 12:38:02 -0400 Received: from [176.228.60.248] (port=3678 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iCRLd-0001Zu-36; Mon, 23 Sep 2019 12:38:01 -0400 Date: Mon, 23 Sep 2019 19:37:56 +0300 Message-Id: <83d0frotnf.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> (message from Christian Johansson on Mon, 23 Sep 2019 07:18:25 +0200) References: <838sqgqtam.fsf@gnu.org> <8336goqr10.fsf@gnu.org> <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 37480@debbugs.gnu.org > From: Christian Johansson > Date: Mon, 23 Sep 2019 07:18:25 +0200 > > Alright, I didn't know about that function. Can you give an example of > how to use it? It tried the following but it doesn't work, it seems the > thread dies after the signal and I'm not sure were it exits. > > (make-thread >  (lambda() >    (message "Start of asynchronous thread") >    (signal 'error '("Fatal error")) >    (message "End of asynchronous thread") >    (message "Last error %s" (thread-last-error)))) This function is supposed to be used by a thread other than the one that hit the error. > For my ssh-deploy plugin, sometimes a asynchronous process or thread > gets an error, could be network issues for instance and I would like to > be able to handle these cases. If you want to handle the error in the thread which gets the error, just use condition-case or similar construct in that thread. If you want to handle the error in another thread, thread-last-error is for you. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 03:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 37480@debbugs.gnu.org Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.156929501027966 (code B ref 37480); Tue, 24 Sep 2019 03:17:02 +0000 Received: (at 37480) by debbugs.gnu.org; 24 Sep 2019 03:16:50 +0000 Received: from localhost ([127.0.0.1]:37375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCbJq-0007H0-Ft for submit@debbugs.gnu.org; Mon, 23 Sep 2019 23:16:50 -0400 Received: from cvj.se ([31.192.230.63]:58936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCbJn-0007Gn-9C for 37480@debbugs.gnu.org; Mon, 23 Sep 2019 23:16:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=TKhMvuMikmDPEw9g9H+DPxNkMe8960xBWleEWLbTgfY=; b=LMbSPcv827ez1M2AS1xeooxOTjq7Re3NPiEMYO8T2XAiaAl1P7hrlXVJWOU5+hjhSN5z75sBdiV5xdUXTntvM/kG3njHslphkI2eeIrw1nD/WLIFsoNSlLw3LqyZ+m3sNbxUvFu52iSZs9IdvsdMCMXc69nwFcl1Uzz4/pYtVUw=; Received: from c-2f5ee255.011-155-65736b4.bbcust.telenor.se ([85.226.94.47] helo=[192.168.1.11]) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1iCbJk-0004Kt-0M; Tue, 24 Sep 2019 05:16:45 +0200 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Christian Johansson X-Mailer: iPhone Mail (16G102) In-Reply-To: <83d0frotnf.fsf@gnu.org> Date: Tue, 24 Sep 2019 05:16:41 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <838sqgqtam.fsf@gnu.org> <8336goqr10.fsf@gnu.org> <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> <83d0frotnf.fsf@gnu.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ok thanks, now I understand 23 sep. 2019 kl. 18:37 skrev Eli Zaretskii : >> Cc: 37480@debbugs.gnu.org >> From: Christian Johansson >> Date: Mon, 23 Sep 2019 07:18:25 +0200 >> >> Alright, I didn't know about that function. Can you give an example of >> how to use it? It tried the following but it doesn't work, it seems the >> thread dies after the signal and I'm not sure were it exits. >> >> (make-thread >> (lambda() >> (message "Start of asynchronous thread") >> (signal 'error '("Fatal error")) >> (message "End of asynchronous thread") >> (message "Last error %s" (thread-last-error)))) > > This function is supposed to be used by a thread other than the one > that hit the error. > >> For my ssh-deploy plugin, sometimes a asynchronous process or thread >> gets an error, could be network issues for instance and I would like to >> be able to handle these cases. > > If you want to handle the error in the thread which gets the error, > just use condition-case or similar construct in that thread. If you > want to handle the error in another thread, thread-last-error is for > you. From unknown Fri Jun 13 10:47:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37480: 27.0.50; uncaught exception Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 04:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: Christian Johansson , 37480@debbugs.gnu.org, Eli Zaretskii Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.157310075920011 (code B ref 37480); Thu, 07 Nov 2019 04:26:01 +0000 Received: (at 37480) by debbugs.gnu.org; 7 Nov 2019 04:25:59 +0000 Received: from localhost ([127.0.0.1]:41550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSZMs-0005Ce-Q4 for submit@debbugs.gnu.org; Wed, 06 Nov 2019 23:25:59 -0500 Received: from host.gofardesign.uk ([208.79.239.190]:43503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSZMo-0005CM-HN; Wed, 06 Nov 2019 23:25:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zx1MRVdg7yTr35xrNjw7eQTzNI5IXwjErgKBBfp+pMk=; b=Nf1G7zPw+hvmnq5F+4jg7CMgvc 9qAD+7XICxvBX6q9spvRFOexeTbFdNqaXtF+x8UVe/tZti7uKXIy4Nz/AwOB7q4fn+RnlYEoiju3B HhxYAwHtXchOClbVLsoSMXiZLfVOymlkrEt0WhOOn66sw0g7UPXfrbP2/8t/Ib80wf40=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:48066 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iSZMb-0000KY-VH; Wed, 06 Nov 2019 22:25:48 -0600 From: Stefan Kangas In-Reply-To: <87v9tkmfwz.fsf@gmx.de> (Michael Albinus's message of "Sun, 22 Sep 2019 18:53:00 +0200") References: <838sqgqtam.fsf@gnu.org> <87v9tkmfwz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Thu, 07 Nov 2019 05:25:38 +0100 Message-ID: <87mud8z519.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 37480 + moreinfo close 37480 thanks Michael Albinus writes: > Christian Johansson writes: > >> Hi! > > Hi Christian, > >> I have a case were a error occurs inside a tramp thread and I would >> like to be able to handle it > > Could you give more details on the error inside a tramp thread? I'm > interested in. > > Furthermore, Tramp in its own repository (not Emacs master) has more > support for threads. This includes better reports about errors inside > threads. > > Hmm, maybe I shall sync this with the feature/tramp-thread-safe branch ... More information was requested, but none was given within 6 weeks, so I'm closing this bug. The rest of the discussion was clarifications on how to use threads. If there is still an issue here, please reopen the bug report. Best regards, Stefan Kangas