theKindOfMe

July 10, 2009

Ever got a exception like “_COMPlusExceptionCode = x” in .net?

Filed under: Uncategorized — Tags: , , — yasi8h @ 6:05 am

In Short:

if you ever get a exception like “_COMPlusExceptionCode = x” in a .net application while you are debugging it in visual studio, look at the following screenshots.

Long Story:

While working on a asp mvc project i got a exception when the EF was trying to save some changes to the db. so i examined the exception object via visual studio’s visual aids. it said _COMPlusExceptionCode = -532459699 ! now what is that?

complusexception while debugging in visual studio

complusexception while debugging in visual studio

after some googling… i felt a bit lost. but by accident i came across the following error message in the same application, in the same line no, for the same exception. a usual ‘exception icon’ or whatever you call it.

a exception icon displayed in visual studio

a exception icon displayed in visual studio

now when i click on that…

visual studio exception infomation dialog been displayed for a update exception

visual studio exception infomation dialog been displayed for a update exception

viola! there is my exception. it seems that visual studio decodes these COM Plus Exception Codes to meaningful exceptions. but at times its easy to miss this way of viewing the exception.

Advertisements

12 Comments »

  1. I have the exact same error. Were you able to figure out what caused the exception in the first place?

    Comment by Gary S — July 22, 2009 @ 6:13 pm

    • Hi Gray,
      in my case i was trying to save a entity that had ilegile values set to some of it’s properties. i had some invalid DateTime values set. but it can be anything really. did you look at the inner exception and the stack trace? i was able to figure out whats going wrong by looking at the inner exception in my case.

      Comment by yasi8h — July 23, 2009 @ 1:38 am

  2. I was having trouble trying to figure out what my exception code was and never saw that stupid icon until reading your post. Thanks! It saved a lot of time.

    Comment by Loco Minera — July 31, 2009 @ 7:16 pm

    • yeah i know. sometimes you just can’t see that little icon! i have wasted a lot of time searching for ‘com exception -212314125’ online because of it! 🙂

      Comment by yasi8h — August 1, 2009 @ 12:59 am

  3. Thanks for posting your experience, it helped me too. 🙂

    Vijay

    Comment by Vijaykumar — January 16, 2010 @ 12:29 am

    • happy to help 🙂

      Comment by yasi8h — January 16, 2010 @ 3:45 am

  4. I am also facing same error.what is the solution of this problem? Please send as early as possible.What is that exception _COMPlusException code -53245969?

    Comment by Venkat — September 14, 2010 @ 7:14 am

  5. Try to use catch(Exception e) instead of catch(Exception)

    Comment by arinto — April 4, 2011 @ 4:46 am

  6. In my program the little icon only appears when I move the mouse over “catch”.
    The error was in another class, but the error came here. The error was: I added a int[] instead a int to chart.Series.Point

    Comment by MyName — May 12, 2011 @ 7:06 am

  7. Thanks a lot for this eye-opener!

    Comment by Martin — August 1, 2011 @ 6:46 pm

  8. […] Ever got a exception like “_COMPlusExceptionCode = x” in .net …Jul 10, 2009 … if you ever get a exception like “_COMPlusExceptionCode = x” in a .net … it said _COMPlusExceptionCode = -532459699 ! now what is that? […]

    Pingback by Complusexceptioncode 532459699 | Superstartrave — September 5, 2012 @ 6:24 pm

  9. You’re the king!!!!!! Thanks a lot for this!!!!

    Comment by Nazareth — October 30, 2013 @ 2:36 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: