apoch / epoch-language

Home of the Epoch Programming Language Project
Other
72 stars 3 forks source link

Supplement code with checked assertions/assumptions #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently many possible errors in the code are allowed to slide; introduce 
assertions (and, where appropriate ASSUMEs) to trap error conditions early 
and report them.

Consider splitting this up into "debug only" assertions that only Fugue 
developers will care about, and "user related" assertions that end-user Epoch 
programmers might be able to handle.

Original issue reported on code.google.com by don.ap...@gmail.com on 1 Feb 2010 at 5:19

GoogleCodeExporter commented 9 years ago

Original comment by don.ap...@gmail.com on 18 Sep 2010 at 7:38

GoogleCodeExporter commented 9 years ago
As a stylistic decision, we will be preserving the current approach of throwing 
exceptions in case of problems. This offers two benefits. First, it allows the 
software itself to recover from non-fatal assertions in cases where this is 
possible. Secondly, it eliminates the need for yet another error-presentation 
method, which may serve only to complicate things for end users.

A cursory review of the codebase indicates that the majority of code is already 
sufficiently paranoid and throws exceptions liberally in error situations. This 
task will therefore be closed, although that should not preclude the addition 
of improved error handling on a case-by-case basis throughout the course of 
developing Release 10.

Original comment by don.ap...@gmail.com on 20 Sep 2010 at 2:04