Skip to content
Gergely Patay edited this page Apr 10, 2015 · 4 revisions

Refactoring ideas

Fail early and fail loudly

The GATE source code is full of default and fallback values (e.g. when a file is missing). A research software shall fail when it encounters an error, not continue from some assumed "fair" state (remember, GATE is used even for radiotherapy!!).

Logging facilities

if (nVerboseLevel > 2)
    G4cout << "SomePartOfCode::MessageText" << G4endl;

already available solution:

GateMessage("PartOfCode", loglevel, "messagetext")

Clone this wiki locally