From 194656da3b872ea2476fb6ce953fc9fb62487846 Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Sun, 31 Dec 2023 21:10:00 +0200 Subject: [PATCH] improve assembly load error (#2989) --- ParserTools/ParsersController.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ParserTools/ParsersController.cs b/ParserTools/ParsersController.cs index 0a9a05aee..0250322b7 100644 --- a/ParserTools/ParsersController.cs +++ b/ParserTools/ParsersController.cs @@ -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);