Getting 'message' from a custom exception class
问题 This question refers to an answer here. I need to access message of a custom exception. Is this possible? I thought that directly calling message will suffice as in this example: class MyCustomError < StandardError attr_reader :object def initialize(object) @object = object puts message end end but this is not what I expected it to be. It gave me some string like: "MyModuleNameHere::MyCustomExceptionClassNameHere" instead of: "a message" My intuition is leaning towards no, since the