DEV: Better error handling for destroy:users task (#9939)

DEV: Better error handling for destroy:users task (#9939)

diff --git a/app/services/destroy_task.rb b/app/services/destroy_task.rb
index b76d8f7..a366312 100644
--- a/app/services/destroy_task.rb
+++ b/app/services/destroy_task.rb
@@ -90,6 +90,8 @@ class DestroyTask
         raise Discourse::InvalidAccess.new("User #{user.username} has #{user.post_count} posts, so can't be deleted.")
       rescue NoMethodError
         @io.puts "#{user.username} could not be deleted"
+      rescue Discourse::InvalidAccess => e
+        @io.puts "#{user.username} #{e.message}"
       end
     end
   end

GitHub sha: c01a9942

This commit appears in #9939 which was approved by eviltrout. It was merged by tshenry.