George Clingerman

      XNADevelopment.com
posts - 188, comments - 1508, trackbacks - 181

My Links

News



Twitter












Tag Cloud

Article Categories

Archives

Post Categories

. XNADevelopment.com .

Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

G360-1 I’ve always enjoyed using Nick Gravelyn’s exception handling in all of my games. You’re always going to encounter those unhandled exception that your players are going to ferret out and having a method to display them rather than just crashing to the dashboard is definitely more of an elegant solution. But the other day I got to thinking…what if we could do more? What if instead of just displaying the error, we could encourage the players to send us the error. So I started playing with that an expanding upon Nick’s sample code to see what I could come up with.

I got close to what I envisioned, but unfortunately there were some limitations to just what the XNA API could do. In my head I was picturing the players hitting “Send Message” and a 360 message would just be sent to the XBLIG developer. Unfortunately, you can only send messages in an XNA game to someone you’re currently in a network session with. Since I didn’t want to have a 360 server running all the time, virally connecting to players just to get error messages, I did the next best thing and just open up a 360 message and encourage them to manually enter the gamertag. Maybe someday we’ll be able to do that a little better, but this works for now.

In the sample, players can hit the “A” button or key to generate in an exception. If the debugger is not attached, then the Exception message screen will be shown explaining what has happened and giving the player a chance to send a 360 message to the gamertag provided or maybe even just send an email. Nick’s code has been changed just a bit. It now accepts any PlayerIndex (no longer hard coded to just PlayerIndex.One) and it no longer uses a MessageBox to get the users selection. The code has also been modified so that it works both for the 360 and for the PC.

Check out “Tell me what’s wrong!” and let me know if you have any thoughts or suggestions. I really do appreciate the feedback.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Saturday, April 03, 2010 8:45 PM |

Feedback

Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

Very nice extension to nick's work. Unfortunately, when I've tried to port your solution into my engine, I got error 4 on console, but only if I start the game by the dashboard. If I run it by the XNA Connection Studio it works very well. The PC version always work.

I need to investigate more, because your version runs well on my console. But if you have some idea about what error 4 is, it will help me:)

Thanks
4/14/2010 5:53 PM | Vando
Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

Just added this to Hypership. Thanks George!
7/28/2010 1:50 AM | Kris
Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

I am happy when reading your blog with updated information! thanks alot and hope that you will post more site that are related to this site.
Kingspan Insulation
8/21/2011 7:25 AM | sooperdooper
Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

Well this is a very nice tutorial and I learn a lot of good things from this blog... I really like this blog... Thanks for the help... latest news today
10/26/2011 12:46 PM | umair
Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

Just added that to Hypership. Thanks George!
11/4/2011 12:46 AM | Berufstest Berufswahltest
Gravatar

# re: Tell me what’s wrong! – An XNA sample demonstrating exception handling and reporting in your XBLIG

Great and excellent post. Thanks.
1/12/2012 6:15 AM | Get Back Together With Your Ex
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: