Avoid direct recursion when computing the exceptions of a method.

* exceptions.cs: When Filling the exceptions of a method make sure
	to not recurse on the methods itself as this can lead to a stackoverflow.
This commit is contained in:
Rodrigo Kumpera committed 2013-05-28 20:05:37 -04:00
1 parent 5c9cedd328
commit 04bf9add68
1 file changed
+4
@@ -145,6 +145,10 @@ namespace Mono.Documentation {
body.Method.DeclaringType.Scope.Name == memberRef.DeclaringType.Scope.Name) ||
((locations & ExceptionLocations.DependentAssemblies) != 0 &&
body.Method.DeclaringType.Scope.Name != memberRef.DeclaringType.Scope.Name)) {
if (memberRef.Resolve () == body.Method)
break;
IEnumerable<ExceptionSources> memberExceptions = this [memberRef];
AddExceptions (body, instruction,
memberExceptions.Select (es => es.Exception),