<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://editthis.info/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://editthis.info/java4c/?action=history&amp;feed=atom&amp;title=Os_error</id>
		<title>Os error - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://editthis.info/java4c/?action=history&amp;feed=atom&amp;title=Os_error"/>
		<link rel="alternate" type="text/html" href="http://editthis.info/java4c/?title=Os_error&amp;action=history"/>
		<updated>2026-06-12T22:54:33Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.15.1</generator>

	<entry>
		<id>http://editthis.info/java4c/?title=Os_error&amp;diff=1443&amp;oldid=prev</id>
		<title>Admin:&amp;#32;starting text</title>
		<link rel="alternate" type="text/html" href="http://editthis.info/java4c/?title=Os_error&amp;diff=1443&amp;oldid=prev"/>
				<updated>2011-06-03T19:56:00Z</updated>
		
		<summary type="html">&lt;p&gt;starting text&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Navigation==&lt;br /&gt;
* up: [[OSAL]] // [[Main_Page]]&lt;br /&gt;
* siblings: [[os_types_def]] // [[os_AtomicAccess]] // [[os_mem]] // [[os_time]] // [[os_file]] // [[os_endian]]&lt;br /&gt;
* MultiThreading: [[os_thread]] -- [[os_waitnotify]] -- [[os_sync]] -- [[os_socket]]&lt;br /&gt;
* [[os_Shared_Memory]] -- [[Dual port RAM]] -- [[InterProcessCommunication]]&lt;br /&gt;
* [[os_driver]] operation access at driver level&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Generally an error handling is necessary to detect failures in the software. In a situation where a function doesn't know what to do &lt;br /&gt;
*either it should return with an message ''error'' &lt;br /&gt;
*or it should call an error routine &lt;br /&gt;
*or it should throw an exception.&lt;br /&gt;
&lt;br /&gt;
In the first case the user should be check the return state and handle with the error, whereby in the last two cases the user should not know anything about possible errors in its ''best case programming branch''. Therefore a try-catch-throw mechanism is established for high level user programming. But in the OSAL layer usual a return value is used to detect the error state. It is so, because any try-catch mechanism is defined in a layer above the OSALs one only.&lt;br /&gt;
&lt;br /&gt;
Nevertheless it is advisable to support an error handling adequate to try-throw at OSAL-level too.&lt;br /&gt;
&lt;br /&gt;
==Error handling in OSAL==&lt;br /&gt;
&lt;br /&gt;
The OSAL in the CRuntimeJavalike environment supports the following mechanism:&lt;br /&gt;
&lt;br /&gt;
===Error routine to user level support===&lt;br /&gt;
A function type&lt;br /&gt;
&lt;br /&gt;
 C_TYPE typedef void MT_os_Error(int errorCode, const char* description, int value1, int value2);&lt;br /&gt;
&lt;br /&gt;
is defined. The routine&lt;br /&gt;
&lt;br /&gt;
 extern_C int os_setErrorRoutine(MT_os_Error* routine);&lt;br /&gt;
&lt;br /&gt;
accepts any routine with this prototype. Using this mechanism any error at OSAL level can be transferred to a higher user level, for example to use a throw mechanism in a try-catch environment or to support an error logging.&lt;br /&gt;
&lt;br /&gt;
All conflicts in the OSAL adaption routines with the operation system or with itself should call the routine ...TODO&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>