Where to check Exception of plugin

Hi,

I use a plugin containing

          rescue Exception => e
            feed.exceptions << e.message << '&#10;'
          end

I want to know where to check the exceptions? A log file or other place? How to enter that? Thanks. (my discourse installed in docker)

I found nothing in /logs

1 Like

If you want to log an exception to the logs try

Rails.logger.warn "your text goes here"

If you want to report an exception use:

Discourse.warn_exception(e, message: "something went wrong")

warn_exception is a bit smarter cause it keep a proper backtrace associated with the message.

4 Likes

thank you!!! I will check it.