- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Control flow exceptions
Wed, 2009-07-08, 10:33
There's a growing number of exceptions in the compiler and standard
libraries which are used solely for control flow. Unfortunately there
isn't currently any straightforward way to distinguish them from
exceptions which actually indicate problems. This is causing me a few
minor headaches with reporting in the IDE, and more generally it's a
bit of a pain.
So I propose the addition of a scala.util.control.ControlException
trait and have all the relevant exceptions mix it in ... this would
allow code which cares to filter out control exceptions simply.
The exceptions affected would be,
scala.tools.nsc.ast.parser.MarkupParsers
ConfusedAboutBracesException
MissingEndTagException
MarkupParsers.TruncatedXML
scala.tools.nsc.interactive.CompilerControl
CancelActionReq
FreshRunReq
ShutdownReq
scala.tools.nsc.interactive.Global
TyperResult
scala.tools.nsc.typechecker.Infer
DeferredNoInstance
NoInstance
scala.actors
KillActorException,
QuitException
SuspendActorException
scala.runtime
NonLocalReturnException
scala.util.control
BreakException
Are there any that I've missed or which shouldn't be included on this list?
Thoughts?
Cheers,
Miles
On Wed, Jul 8, 2009 at 5:33 AM, Miles Sabin <miles@milessabin.com> wrote:
--
http://erikengbrecht.blogspot.com/