Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 185689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:30:53+00:00 2026-05-11T15:30:53+00:00

Is there a library or easy way to catch exceptions thrown in a Ruby

  • 0

Is there a library or easy way to catch exceptions thrown in a Ruby program and log it to a file? I’ve looked over log4r and logger, but the docs on both don’t provide any examples on how I would do this. I run this program remotely and lose handles to stdout and stderr, if that information helps at all.

What would you recommend?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:30:53+00:00Added an answer on May 11, 2026 at 3:30 pm

    If you want to take a walk on the wild side, try this:

    class Exception   alias real_init initialize   def initialize(*args)     real_init *args     # log the error (self) or its args here   end end 

    This will intercept the creation of new exception objects at the moment of creation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question: Is there an easy way (library function) to perform a bitwise AND or
Is there some library for using some sort of cursor over a file? I
Is there an easy way without having to use java library to concat two
Is there any easy way / library / external app to introduce Unit of
Is there an easy way, or free library, that will allow you to append
In VB.NET is there a library of template dialogs I can use? It's easy
Is there an easy way to check whether a phone number entered by the
I'm looking for an easy way of packing/unpacking data structures for sending over the
Is there an easy way to get ride of the traditional quartiles returned by
Is there a way to test if a collection is already initialized? try-catch only?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.