Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Fatal error kills app in try/catch - - Why?
Re: Fatal error kills app in try/catch - - Why? [message #30258 is a reply to message #30238] Tue, 21 December 2010 03:54 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Another way this can be handled is:
    try{
	Vector<String> vBL = Split(BLoc, ',');
	if(vBL.GetCount() < 3){ BaseLoc<<= "Invalid data " + BLoc; return;}

In the BaseLoc EditField a user is informed the data is incorrect and the data input is still there. Since space is an issue that is preferred rather than the big Exclamation() pop up. The third data field is Altitude which is used a few lines down in the code.

Searching the net found for Vector .size() that worked but the Upp pop up had the option of .GetCount.

What difference is there for .size or .GetCount?
edit: Apparently they are the same except .getCount was not introduced until VC++ 7.0.
http://www.codeguru.com/forum/showthread.php?t=333640

Now to search the MyApps directory for Vector and add this error handling where necessary, much easier than getting a bug report and fixing it later.

Neil

[Updated on: Tue, 21 December 2010 04:14]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: document icon, how to?
Next Topic: Any tuple examples?
Goto Forum:
  


Current Time: Sun Aug 24 11:26:03 CEST 2025

Total time taken to generate the page: 0.04759 seconds