improve assembly load error (#2989)

This commit is contained in:
Sun Serega 2023-12-31 21:10:00 +02:00 committed by GitHub
parent 30668e650a
commit 194656da3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.IO;
@ -55,6 +55,12 @@ namespace PascalABCCompiler.Parsers
}
}
}
catch (System.Reflection.ReflectionTypeLoadException e)
{
Console.Error.WriteLine("Parser {0} reflection error {1}", Path.GetFileName(fi.FullName), e);
foreach (var le in e.LoaderExceptions)
Console.Error.WriteLine(le);
}
catch (Exception e)
{
Console.Error.WriteLine("Parser {0} loading error {1}", Path.GetFileName(fi.FullName),e);