Skip to content
Snippets Groups Projects
Commit 19bc7445 authored by Marco Biasini's avatar Marco Biasini
Browse files

fix a FIXME

parent f37ab9a6
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,12 @@ class Diagnostics;
typedef boost::shared_ptr<Diagnostics> DiagnosticsPtr;
class DLLEXPORT DiagError : public Error {
public:
DiagError(const Diag& diag) : Error(diag.Format(false)) {}
};
class DLLEXPORT_OST_CONOP Diagnostics {
public:
typedef std::vector<Diag*>::iterator diag_iterator;
......
......@@ -114,7 +114,7 @@ void RuleBasedProcessor::ProcessUnkResidue(DiagnosticsPtr diags,
.AddResidue(res);
break;
case CONOP_FATAL:
// FIXME: Implement a ConopError based on Diag...
throw DiagError(Diag(DIAG_UNK_RESIDUE, "unknown residue %0").AddResidue(res));
break;
case CONOP_REMOVE_RESIDUE:
case CONOP_REMOVE:
......@@ -162,6 +162,7 @@ void RuleBasedProcessor::ProcessUnkAtoms(DiagnosticsPtr diags,
.AddResidue(i->GetResidue()).AddString(i->GetName());
break;
case CONOP_FATAL:
throw DiagError(Diag(DIAG_UNK_ATOM, "unknown atom %0").AddAtom(*i));
// FIXME: Implement a ConopError based on Diag...
break;
case CONOP_REMOVE_RESIDUE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment