Skip to content
wpdev

.NET / C#

April 2015

You are browsing the site archives for April 2015.

Inspecting unhandled exceptions – You’ve got only one chance

2015-04-12
By: Kevin Gosse
On: April 12, 2015
Tagged: C#, WinRT

That’s a surprising behavior, brought to my attention by this question of Anthony Wieser on MSDN forums. Basically, he noticed that in the global exception handler, he could read the stacktrace of the exception only once. On the subsequent tries, the value would be null. The debugging part We’ll start by making a simple program to reproduce the issue. When the user click on a button, we throw a custom exception: In the App.xaml.cs file, we subscribe to the unhandled exception handler, and print twice the stacktrace of the exception:  Sure enough, the stacktrace is printed only once. The second time, the property is null. What’sRead More →

Recent Posts

  • Uncovering a bug in Attribute.GetHashCode
  • [UWP] NavigationService with back button handler priority
  • [UWP] Bandwidth adaptive image control
  • [uwp] Animation orchestration using Caliburn.Micro coroutines
  • Should I await the last call in a method

Archives

  • March 2017 (1)
  • February 2016 (1)
  • January 2016 (1)
  • October 2015 (1)
  • September 2015 (2)
  • August 2015 (1)
  • May 2015 (1)
  • April 2015 (1)
  • March 2015 (3)
  • October 2014 (1)
  • September 2014 (1)
  • November 2013 (1)
  • August 2013 (1)
  • May 2013 (1)
  • February 2013 (1)
  • December 2012 (1)
  • October 2012 (2)
  • July 2012 (1)
  • May 2012 (1)
  • February 2012 (1)
  • January 2012 (4)

Follow me on Twitter

My Tweets

Designed using Dispatch WordPress Theme. Powered by WordPress.