BuildManagerWrapper suggestion?

Last post 07-08-2009 5:28 PM by happyfirst. 0 replies.

Sort Posts:

  • BuildManagerWrapper suggestion?

    07-08-2009, 5:28 PM
    • Member
      18 point Member
    • happyfirst
    • Member since 01-24-2008, 3:04 PM
    • Posts 63

     I normally only rely on exceptions for those situations that just should not happen. However, BuildManagerWrapper, throws these alot as it tries all the various directories looking for a view. So if I turn on to drop into code on any exception, I have to F5 through a TON of these, so many that it's just useless.

    I added the following code:

    #if DEBUG

    if (!File.Exists(HttpContext.Current.Server.MapPath(virtualPath);)) return null;

    #endif

    to the BuildManagerWrapper just before the call to CreateInstanceFromVirtualPath. Is there a reason you're intentially just calling BuildManager.CreateInstanceFromVirtualPath directly and letting it throw all these exceptions?

Page 1 of 1 (1 items)