Finally trying hard to catch exceptions
Prexonite now comes with exception handling in the form of try-catch-finally blocks. Their implementation is a bit different from the ones in C#.
Add System::IO to Imports;
function main
{
try
{
var sw = new StreamWriter("foo.txt");
sw.WriteLine("It worked!");
}
catch(var exc)
{
println(exc);
}
finally
{
dispose(sw);
}
}
function main
{
try
{
var sw = new StreamWriter("foo.txt");
sw.WriteLine("It worked!");
}
catch(var exc)
{
println(exc);
}
finally
{
dispose(sw);
}
}
[Read more →]