On Thursday, 8 May 2014 at 09:15:16 UTC, amehat wrote:
Hello everyone,

in java, you can have exceptions on methods.
Thus we can write:
public static void control (String string) throws
MyException {}

Is that possible in D and if so how does it work? If I write this D:

public void testMe () throws MyException {}

The compiler refuses to compile.

What is the proper behavior for this D?

thank you

All functions/methods can throw in D, unless they are marked nothrow.

Reply via email to