Commits

Peter Szilagyi  committed b312017

Fixed one bogus-looking condition-case.

  • Participants
  • Parent commits 75e1103

Comments (0)

Files changed (2)

File elisp/omake/omake-file.el

 (defconst Omake.File.emacs-log-pid-dir
   (format "%s/%d" Omake.File.emacs-log-dir (emacs-pid)))
 
-(condition-case _
+(condition-case err
     (progn (make-directory Omake.File.emacs-log-pid-dir t)
            (Omake.File.check-root-perms))
-  ;; CR pszilagyi: I think this is wrong.  The first "error" is a
-  ;; condition name; I think the intension is that the handler then
-  ;; call the ERROR function, given the arguments.  There may be other
-  ;; instances, although Omake.handle-errors looks right.
-  (error "Couldn't create the Omake emacs-log.  Check the permissions on %s"
-         Omake.File.root))
+  (error (message "Couldn't create the Omake emacs-log.  Check the permissions on %s: %s"
+                  Omake.File.root
+                  (error-message-string err))))
 
 (defun Omake.File.emacs-log ()
   (format "%s/%s"

File elisp/omake/omake-interface.el

     (Omake.with-updated-projects
       (let* ((ps (mapcar (lambda (m) (Omake.Id.to-string (Omake.Model.id m)))
                          (Omake.Model.models)))
+             ;; CR pszilagyi: ignore-errors?
              (cid (condition-case nil (Omake.Id.current) (error nil)))
              (initial (when (and cid (Omake.Model.has cid)) (Omake.Id.to-string cid)))
              (id (if id id (Omake.Id.of-path