From b324d76d6307461e0fb059a3175d76c29e9d443e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 11 Nov 2016 14:25:06 -0800 Subject: Use `user-error` to report error. This is the function to use to report errors to the user. --- pants.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pants.el b/pants.el index a09e3d8..548aa83 100644 --- a/pants.el +++ b/pants.el @@ -172,7 +172,7 @@ (let ((build-file (pants--get-build-file-for-current-buffer))) (if build-file (find-file (concat build-file pants-build-file)) - (error "Could not find %s" pants-build-file)))) + (user-error "Could not find %s" pants-build-file)))) ;;;###autoload (defun pants-run-binary () @@ -181,7 +181,7 @@ (let ((build-file (pants--get-build-file-for-current-buffer))) (if build-file (pants--build-target-list build-file 'pants--build-action) - (error "Could not find %s" pants-build-file)))) + (user-error "Could not find %s" pants-build-file)))) ;;;###autoload (defun pants-run-python-repl () @@ -190,7 +190,7 @@ (let ((build-file (pants--get-build-file-for-current-buffer))) (if build-file (pants--build-target-list build-file 'pants--python-repl-action) - (error "Could not find %s" pants-build-file)))) + (user-error "Could not find %s" pants-build-file)))) ;;;###autoload (defun pants-run-test () @@ -199,7 +199,7 @@ (let ((build-file (pants--get-build-file-for-current-buffer))) (if build-file (pants--build-target-list build-file 'pants--test-action) - (error "Could not find %s" pants-build-file)))) + (user-error "Could not find %s" pants-build-file)))) ;;;###autoload (defun pants-run-fmt () @@ -208,6 +208,6 @@ (let ((build-file (pants--get-build-file-for-current-buffer))) (if build-file (pants--build-target-list build-file 'pants--fmt-action) - (error "Could not find %s" pants-build-file)))) + (user-error "Could not find %s" pants-build-file)))) (provide 'pants) -- cgit v1.2.3