Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmt-dev] Error Transformations

Hi All

I think I've finally realised how to handle error diagnosis in UMLX.
Once again the problem vanishes when you break it down into parts.

In normal code, errors are interwoven, which is efficient until you
want to disentangle the error aspect - e.g. to interantionalise it.

I think errors should be handled by separate transforms, that are
bound to the appropriate checking context.

e.g. To check a bidirectional parent-child relationship, a
transform gets bound to the parent and child and validates it,
so the caller just sees CheckBiDirectionalRelationship with parent
and child as inputs. Internally one or more unsatisfactory
textures provoke a transformation to create an appropriate element
from an Error model.

This leaves two problems:

a) transformation of the Error element to human-readable form, which
may be just a text generation problem, see separate thread on
Text transformation.

b) what to do with the Error element.

The latter problem has a naive solution such as a global stderr, cerr,
System.err that serialises all errors. If the user wants more
accurate error handling then the user can make the error model
an explicit part of the iuser transformations.

However this gives two different programming modes, and re-usable
libraries should not come in two flavours, explicit and implicit
error reporting. So how do we make errors controllable within
a transformation hierarchy without requiring explicit modelling
at every level?

Is there an implicit behaviour that supplies an error output for
every transform without an error output?

If there is such an implicit behaviour, should it be available for
other categories of output as well? e.g. a CodeCoverage output
or a Debug output.

		Ed Willink

E.D.Willink,                             Email: mailto:EdWillink@xxxxxxx
Thales Research and Technology (UK) Ltd, Tel:  +44 118 923 8278 (direct)
Worton Drive,                            or  +44 118 986 8601 (ext 8278)
Worton Grange Business Park,             Fax:  +44 118 923 8399
Reading,   RG2 0SB
(formerly Racal Research and Thomson-CSF)

As the originator, I grant the addressee permission to divulge
this email and any files transmitted with it to relevant third parties.

Back to the top