diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-15 10:49:13 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-15 10:49:13 +0200 |
commit | a53d9824fe19c7ddeea665878fd963a5b11695f5 (patch) | |
tree | 2d5106da645e3dca392c7df716858d225a30d5b9 /lisp/mastodon-toot.el | |
parent | dd5a34bb8db2f544b53811fb89dfa649ecca198c (diff) |
change some error calls to user-error calls
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index acedcfe..51e0458 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -376,13 +376,13 @@ TYPE is a symbol, either `favourite' or `boost.'" ;; this boosts/faves the base toot, not the notif status ((and (equal "reblog" toot-type) (not (mastodon-tl--buffer-type-eq 'notifications))) - (error "You can't %s boosts" action-string)) + (user-error "You can't %s boosts" action-string)) ((and (equal "favourite" toot-type) (not (mastodon-tl--buffer-type-eq 'notifications))) - (error "You can't %s favourites" action-string)) + (user-error "You can't %s favourites" action-string)) ((and (equal "private" visibility) (equal type 'boost)) - (error "You can't boost private toots")) + (user-error "You can't boost private toots")) (t (mastodon-toot--action action @@ -491,11 +491,11 @@ With FAVOURITE, list favouriters, else list boosters." (params '(("limit" . "80"))) (json (mastodon-http--get-json url params))) (if (eq (caar json) 'error) - (error "%s (Status does not exist or is private)" (alist-get 'error json)) + (user-error "%s (Status does not exist or is private)" (alist-get 'error json)) (let ((handles (mastodon-tl--map-alist 'acct json)) (type-string (if favourite "Favouriters" "Boosters"))) (if (not handles) - (error "Looks like this toot has no %s" type-string) + (user-error "Looks like this toot has no %s" type-string) (let ((choice (completing-read (format "%s (enter to view profile): " type-string) handles @@ -1251,7 +1251,7 @@ INSTANCE is JSON." MAX is the maximum number set by their instance." (let ((number (read-number (format "Number of options [2-%s]: " max) 2))) (if (> number max) - (error "You need to choose a number between 2 and %s" max) + (user-error "You need to choose a number between 2 and %s" max) number))) (defun mastodon-toot--create-poll () |