You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by alasdairhodge <gi...@git.apache.org> on 2015/08/23 22:03:01 UTC

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

GitHub user alasdairhodge opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/864

    Entity proxy unwraps InvocationTargetException

    Propagates *original* exception thrown by actual entity.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alasdairhodge/incubator-brooklyn proxy-invocation-target-exceptions

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/864.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #864
    
----
commit 8c98104a9f73aa720f51564be319107ab763073a
Author: Alasdair Hodge <gi...@alasdairhodge.co.uk>
Date:   2015-08-23T20:01:50Z

    Entity proxy unwraps InvocationTargetException

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-138565364
  
    @alasdairhodge please confirm if you'd like this or close


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-135045233
  
    I usually use `Exceptions.getFirstInteresting(...)` or `e.toString().contains("...")`.  Also note `Exceptions.collapse` will prevent `InvocationTargetException`s and similar from being shown.
    
    In general I think we're better off with that approach (caller cleans up) rather than attempting to clean up intermediate.  (Note if execution is remote, when that's available, this "clean-up" approach will be brittle.)  But if you really want this no objections.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by alasdairhodge <gi...@git.apache.org>.
Github user alasdairhodge closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/864


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by alasdairhodge <gi...@git.apache.org>.
Github user alasdairhodge commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-138866339
  
    Yes, you've convinced me that there's value in keeping the ITE, confusing as it may be in naive use-cases. Happy to close this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by alasdairhodge <gi...@git.apache.org>.
Github user alasdairhodge commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-134524688
  
    Motivated by a desire to write test assertions that my (custom) entities were correctly throwing `IllegalStateException` and other undeclared runtime exceptions in the right situations.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by alasdairhodge <gi...@git.apache.org>.
Github user alasdairhodge commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-133928939
  
    Test failure appears unrelated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Entity proxy unwraps InvocationTa...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/864#issuecomment-138865168
  
    @alasdairhodge as discussed offline, I don't like it when the exception thrown in one thread is then rethrown by another thread, without wrapping it.
    
    If that is done, the exception thrown in the user's thread won't include the user's stacktrace, so the user won't be able to tell what in their code was executing when the exception happened. The avoidance of that confusion justifies keeping the `InvocationTargetException`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---