IL2CPU icon indicating copy to clipboard operation
IL2CPU copied to clipboard

Completely review exception handling

Open jp2masa opened this issue 7 years ago • 3 comments

From @charsleysa on January 4, 2016 8:39

Exception filtering is not yet supported.

For an example of Exception filtering in C# see http://pastebin.com/URkYjsiE

Copied from original issue: CosmosOS/Cosmos#320

jp2masa avatar Oct 21 '17 20:10 jp2masa

From @mterwoord on January 4, 2016 8:41

Lets also include in this issue:

  • Finally clause
  • generic testing

jp2masa avatar Oct 21 '17 20:10 jp2masa

Note from #64 (see also https://github.com/CosmosOS/IL2CPU/pull/64#discussion_r223853431): When throwing an exception, we should empty the stack (if there's no item in the stack, do nothing). I think it would be a good idea to add some common infrastructure to throw exceptions.

jp2masa avatar Oct 09 '18 20:10 jp2masa

It would also be helpful if exceptions in using blocks are also supported. As they right now lead to crashes (CPU Exception 6). Example code: https://github.com/CosmosOS/Cosmos/blob/8b7613e2d81b004e4af72210a7afa60895818231/Tests/Kernels/Cosmos.Compiler.Tests.Exceptions/Kernel.cs#L167

quajak avatar Nov 08 '18 17:11 quajak