Commits

Peter Szilagyi committed b312017

Fixed one bogus-looking condition-case.

Comments (0)

Files changed (2)

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"

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.