Click here to Skip to main content
13,447,996 members (54,198 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 29 Nov 2012

Retrieve the LoaderException Property for More Information…

, 29 Nov 2012
Rate this:
Please Sign up or sign in to vote.
Retrieve the LoaderException property for more information…

Here’s the exception I received today:

System.Reflection.ReflectionTypeLoadException. Unable to load one or more of the 
requested types. Retrieve the LoaderExceptions property for more information.

Isn’t it lovely? Do the authors think I have a little leprechaun sitting on the user machine and waiting for my command to retrieve the pot of gold the LoaderException property?

And if not, what do they expect my handling for oddball exceptions to be like? Perhaps something like:

catch (StrangeExceptionVarietyOne ex)
catch (TotallyObscuredExceptionTwo ex)
catch (ReflectionTypeLoadException ex)
    foreach (var loaderEx in ex.LoaderExceptions) Log(loaderEx.ToString());

Not going to happen. A good exception should have everything in its ToString(). As in “for debugging purposes, AggregateException‘s ToString implementation outputs a string rendering all the contained exceptions“. This is a good exception. This is an exception I like to work with. Why can’t all exceptions be like that?


This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


About the Author

Ivan Krivyakov
Technical Lead Thomson Reuters
United States United States
Ivan is a hands-on software architect/technical lead working for Thomson Reuters in the New York City area. At present I am mostly building complex multi-threaded WPF application for the financial sector, but I am also interested in cloud computing, web development, mobile development, etc.

Please visit my web site:

You may also be interested in...


Comments and Discussions

QuestionAnother way: Pin
jp2code15-Mar-13 10:00
memberjp2code15-Mar-13 10:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180318.3 | Last Updated 29 Nov 2012
Article Copyright 2012 by Ivan Krivyakov
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid