Checked vs unchecked exceptions

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 5 13:35:14 PDT 2017


Am Wed, 28 Jun 2017 11:04:58 +0000
schrieb Moritz Maxeiner <moritz at ucworks.org>:

> One could also make an exception for bodyless functions and allow 
> specification of the exception set *only* there, e.g.
> 
> ---
> // Allow "checked exceptions" for stubs only
> void foo() throws AException throws BException;
> ---

Ah, come one, now that you see the need you can also embrace
it as an option for people who want to add some documentation.

void foo()
  throws AException  // When the ant's life ends prematurely
  throws BException; // When the ant gets distracted by a lady bug

-- 
Marco



More information about the Digitalmars-d mailing list