Quantcast
Channel: gplex Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 33

Created Unassigned: AAST.AddUserPredicate throws exception if first exported type does not match [11861]

$
0
0
In AAST.cs, line 282 throws an exception if the first exported type does not match instead of continuing to iterate over the remaining exported types. The line 'hdlr.ListError(mSpan, 96, clsName); return;' should be moved outside of the loop:
```
foreach (Type type in types)
{
if (type.FullName.Equals(clsName, StringComparison.OrdinalIgnoreCase) ||
type.Name.Equals(clsName, StringComparison.OrdinalIgnoreCase))
{
QUT.Gplex.ICharTestFactory factory =
(ICharTestFactory)System.Activator.CreateInstance(type);

if (factory != null)
{
CharTest test = factory.GetDelegate(mthIdnt);
if (test == null)
hdlr.ListError(mSpan, 97, mthIdnt);
else
AddUserPredicate(name, test);
return;
}
}
hdlr.ListError(mSpan, 96, clsName); return;
}
```

becomes:
```
foreach (Type type in types)
{
if (type.FullName.Equals(clsName, StringComparison.OrdinalIgnoreCase) ||
type.Name.Equals(clsName, StringComparison.OrdinalIgnoreCase))
{
QUT.Gplex.ICharTestFactory factory =
(ICharTestFactory)System.Activator.CreateInstance(type);

if (factory != null)
{
CharTest test = factory.GetDelegate(mthIdnt);
if (test == null)
hdlr.ListError(mSpan, 97, mthIdnt);
else
AddUserPredicate(name, test);
return;
}
}
}
hdlr.ListError(mSpan, 96, clsName); return;
```

In the absence of guidelines for contributing, I'll leave it to you to make the change.
Great tool, thanks for putting it out there!

Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>