Mercurial Hosting > luan
comparison website/src/diff.html.luan @ 483:0db144c98564
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 May 2015 21:08:33 -0600 |
parents | 1285c52ea9d4 |
children | 2b9bc97f0439 |
comparison
equal
deleted
inserted
replaced
482:7e9fcfbf22ec | 483:0db144c98564 |
---|---|
97 | 97 |
98 <p>Every module is initialized with two local functions: <tt>require</tt> and <tt>java</tt>. The module then uses these functions to get access to whatever else it needs.</p> | 98 <p>Every module is initialized with two local functions: <tt>require</tt> and <tt>java</tt>. The module then uses these functions to get access to whatever else it needs.</p> |
99 | 99 |
100 <h3 <%=heading_options%> ><a name="error">Error Handling</a></h3> | 100 <h3 <%=heading_options%> ><a name="error">Error Handling</a></h3> |
101 | 101 |
102 <p>Luan has the functions <tt>error</tt> and <tt>pcall</tt> but does not have <tt>xpcall</tt>. Luan adds the function <tt>try</tt> which looks and acts like try-catch blocks in other languages.</p> | 102 <p>Luan has the functions <tt>error</tt> and <tt>pcall</tt> but does not have <tt>xpcall</tt>. Luan adds the function <tt>try</tt> which looks and acts like try-catch blocks in other languages. Luan errors are implemented as an error table, not as a message object.</p> |
103 | 103 |
104 <h3 <%=heading_options%> ><a name="meta">Metatables and Metamethods</a></h3> | 104 <h3 <%=heading_options%> ><a name="meta">Metatables and Metamethods</a></h3> |
105 | 105 |
106 <p>Luan only has metatable for tables, not for other types.</p> | 106 <p>Luan only has metatable for tables, not for other types.</p> |
107 | 107 |