Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Expose wether exception cause is supported #240

Merged
merged 1 commit into from
Oct 1, 2015

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Sep 28, 2015

No changelog because this is an internal feature

@JonRowe
Copy link
Member Author

JonRowe commented Sep 29, 2015

@samphippen care to give this a once over?

@@ -55,6 +55,18 @@ def caller_locations_supported?
respond_to?(:caller_locations, true)
end

begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about doing a respond_to? check here? I think that'd be a lot cleaner.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I preferred not instantiating an exception...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, right, Exception.instance_methods.include?(:cause)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception.method_defined?(:cause)

No need for a linear include? operation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@JonRowe JonRowe force-pushed the exception_cause_supported branch 2 times, most recently from 9d42426 to c1c5381 Compare September 30, 2015 07:42
@JonRowe
Copy link
Member Author

JonRowe commented Sep 30, 2015

Hmm randomly this is failing on windows but it's for an unrelated encoding spec..

@JonRowe JonRowe force-pushed the exception_cause_supported branch from c1c5381 to 867a144 Compare September 30, 2015 22:23
myronmarston added a commit that referenced this pull request Oct 1, 2015
Expose wether exception cause is supported
@myronmarston myronmarston merged commit cda4cd3 into master Oct 1, 2015
@myronmarston myronmarston deleted the exception_cause_supported branch October 1, 2015 16:34
@myronmarston
Copy link
Member

LGTM. Merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants