activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <jira+amq...@apache.org>
Subject [jira] [Commented] (AMQNET-324) Add inner exceptions to the NMSException called "Error creating transport"
Date Fri, 01 Apr 2011 13:57:08 GMT

    [ https://issues.apache.org/jira/browse/AMQNET-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014562#comment-13014562
] 

Timothy Bish commented on AMQNET-324:
-------------------------------------

We aim to please :)

A new v1.5.1 SNAPSHOT build with latest fixes is available here: 
[http://people.apache.org/~tabish/nms-1.5.0/]

> Add inner exceptions to the NMSException called "Error creating transport"
> --------------------------------------------------------------------------
>
>                 Key: AMQNET-324
>                 URL: https://issues.apache.org/jira/browse/AMQNET-324
>             Project: ActiveMQ .Net
>          Issue Type: Improvement
>          Components: NMS
>    Affects Versions: 1.5.0
>            Reporter: Frank Gynnild
>            Assignee: Timothy Bish
>             Fix For: 1.5.1, 1.6.0
>
>
> The latest 1.5.0 version of Apache.NMS.ActiveMQ uses reflection to find connection factories.
> However, when there are System.Reflection.ReflectionTypeLoadException (Unable to load
one or more of the requested types.)
> being thrown, these exceptions and InnerExceptions are not being encaspulated and rethrown,
so they are kind of difficult to spot.
> This can happen if the dll get ILMerged into another assembly, and there are some issues
with this exception.
> In TransportFactory.cs:
> {code}
> 			try
> 			{
>                 factory = NewInstance(scheme.ToLower());
> 			}
> 			catch(NMSConnectionException)
> 			{
> 				throw;
> 			}
> 			catch
> 			{
> 				throw new NMSConnectionException("Error creating transport.");
> 			}
> {code}
> The NMSConnectionException("Error creating transport.") doesn't tell you the glory details.
> In FactoryFinder.cs, inside the method called private Type SearchAssembly(Assembly assembly,
string factoryId) you have this:
> {code}
> Type[] types = assembly.GetTypes();
> {code}
> This code can throw ReflectionTypeLoadException and it can have multiple InnerException
that will tell you why it is unable to get
> the types. It would be awesome if this exception can be propagated up to the NMSConnectionException
as an InnerException.
> That way we can trace the real problem much easier.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message