#3548: getResearch() should return null if tech not found
-------------------------------------------------+-------------------------
Reporter: aubergine | Owner: per
Type: bug | Status: new
Priority: normal | Milestone:
Component: JavaScript Issues | unspecified
Keywords: getresearch javascript api assert | Version: 3.1
throw try catch error | and master
Blocking: | Blocked By:
| Operating System: All
| /Non-Specific
-------------------------------------------------+-------------------------
Currently getResearch() throws an error if it can't find specified tech.
This leads so some nasty bloaty try...catch code around getResearch().
It would be much better, IMHO, if instead it just returned null if it
can't find the tech -- this will enable much cleaner code in scripts.
--
Ticket URL: <http://developer.wz2100.net/ticket/3548>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project