From bafe2cf0a8548b3e0052cbb1d703089011367555 Mon Sep 17 00:00:00 2001
From: Tobias Knopff <t.knopff@fz-juelich.de>
Date: Wed, 26 May 2021 10:03:03 +0200
Subject: [PATCH] Move Error class from utils/GUIHelpers to Models/Error

---
 GUI/Models/ComboProperty.cpp                  | 12 +++----
 GUI/Models/Data1DViewItem.cpp                 |  6 ++--
 GUI/Models/DataItem.cpp                       |  6 ++--
 GUI/Models/DataItemUtils.cpp                  |  4 +--
 GUI/Models/DataProperties.cpp                 |  7 ++--
 GUI/Models/DataPropertyContainer.cpp          |  4 +--
 GUI/Models/DomainObjectBuilder.cpp            |  6 ++--
 GUI/Models/DomainSimulationBuilder.cpp        |  6 ++--
 GUI/Models/Error.cpp                          | 24 ++++++++++++++
 GUI/Models/Error.h                            | 30 +++++++++++++++++
 GUI/Models/FitParameterItems.cpp              |  6 ++--
 GUI/Models/FitParameterProxyModel.cpp         |  5 +--
 GUI/Models/GUIDomainSampleVisitor.cpp         | 18 +++++------
 GUI/Models/GUIObjectBuilder.cpp               |  6 ++--
 GUI/Models/GroupInfo.cpp                      | 12 +++----
 GUI/Models/GroupInfoCatalog.cpp               | 10 +++---
 GUI/Models/GroupItem.cpp                      |  6 ++--
 GUI/Models/InstrumentItems.cpp                | 13 ++++----
 GUI/Models/IntensityDataItem.cpp              |  4 +--
 GUI/Models/ItemCatalog.cpp                    |  6 ++--
 GUI/Models/JobModelFunctions.cpp              | 23 ++++++-------
 GUI/Models/JobQueueData.cpp                   |  7 ++--
 GUI/Models/MaskItems.cpp                      |  4 +--
 GUI/Models/MaterialItem.cpp                   |  5 +--
 GUI/Models/MesoCrystalItem.cpp                | 14 ++++----
 GUI/Models/ParameterTreeUtils.cpp             |  6 ++--
 GUI/Models/ParticleCoreShellItem.cpp          |  6 ++--
 GUI/Models/RealDataItem.cpp                   |  6 ++--
 GUI/Models/RectangularDetectorItem.cpp        |  4 +--
 GUI/Models/SessionItemTags.cpp                | 14 ++++----
 GUI/Models/SessionModel.cpp                   | 17 +++++-----
 GUI/Models/SessionXML.cpp                     | 10 +++---
 GUI/Models/SpecularDataItem.cpp               |  4 +--
 GUI/Models/TransformFromDomain.cpp            | 32 +++++++++----------
 GUI/Models/TransformToDomain.cpp              |  4 +--
 GUI/Views/CommonWidgets/DocksController.cpp   |  8 ++---
 GUI/Views/CommonWidgets/ItemStackWidget.cpp   |  6 ++--
 GUI/Views/CommonWidgets/ModelTreeView.cpp     |  4 +--
 GUI/Views/FitWidgets/FitObjectiveBuilder.cpp  |  3 +-
 GUI/Views/FitWidgets/FitSessionController.cpp |  3 +-
 GUI/Views/FitWidgets/FitSessionManager.cpp    |  6 ++--
 .../ImportDataWidgets/RealDataPresenter.cpp   |  4 +--
 .../RealDataSelectorWidget.cpp                |  3 +-
 .../InstrumentWidgets/DetectorPresenter.cpp   |  8 ++---
 .../InstrumentWidgets/InstrumentPresenter.cpp |  8 ++---
 .../IntensityDataWidgets/ColorMapUtils.cpp    |  6 ++--
 .../IntensityDataFFTPresenter.cpp             |  4 +--
 .../SaveProjectionsAssistant.cpp              |  6 ++--
 GUI/Views/JobWidgets/JobViewActivities.cpp    |  4 +--
 .../JobWidgets/ParameterTuningWidget.cpp      |  6 ++--
 GUI/Views/MaskWidgets/MaskGraphicsScene.cpp   |  4 +--
 GUI/Views/MaskWidgets/MaskUnitsConverter.cpp  |  4 +--
 GUI/Views/MaskWidgets/MaskViewFactory.cpp     |  8 ++---
 .../MaterialEditor/MaterialItemUtils.cpp      | 20 ++++++------
 GUI/Views/PropertyEditor/CustomEditors.cpp    |  4 +--
 GUI/Views/SampleDesigner/ConnectableView.cpp  |  8 ++---
 GUI/Views/SampleDesigner/DesignerView.cpp     |  4 +--
 GUI/Views/SampleDesigner/ILayerView.cpp       |  4 +--
 .../SampleDesigner/ParticleLayoutView.cpp     |  4 +--
 GUI/Views/SampleDesigner/ParticleView.cpp     |  4 +--
 GUI/mainwindow/AppSvc.cpp                     | 22 ++++++-------
 GUI/mainwindow/OutputDataIOHistory.cpp        | 18 +++++------
 GUI/mainwindow/ProjectUtils.cpp               | 24 +++++++-------
 GUI/mainwindow/SaveService.cpp                |  4 +--
 GUI/mainwindow/projectdocument.cpp            |  7 ++--
 GUI/mainwindow/projectmanager.cpp             |  3 +-
 GUI/mainwindow/tooltipdatabase.cpp            |  6 ++--
 GUI/utils/GUIHelpers.cpp                      | 12 ++-----
 GUI/utils/GUIHelpers.h                        | 15 ---------
 GUI/utils/ImportDataInfo.cpp                  |  8 ++---
 Tests/UnitTests/GUI/TestAxesItems.cpp         |  4 +--
 Tests/UnitTests/GUI/TestDataItemViews.cpp     |  6 ++--
 Tests/UnitTests/GUI/TestGroupItem.cpp         |  8 ++---
 .../UnitTests/GUI/TestOutputDataIOService.cpp |  7 ++--
 Tests/UnitTests/GUI/TestProjectUtils.cpp      |  6 ++--
 Tests/UnitTests/GUI/TestSaveService.cpp       |  3 +-
 .../UnitTests/GUI/TestSavingSpecularData.cpp  |  4 +--
 Tests/UnitTests/GUI/TestSessionItemTags.cpp   | 10 +++---
 Tests/UnitTests/GUI/Utils.cpp                 |  6 ++--
 79 files changed, 354 insertions(+), 309 deletions(-)
 create mode 100644 GUI/Models/Error.cpp
 create mode 100644 GUI/Models/Error.h

diff --git a/GUI/Models/ComboProperty.cpp b/GUI/Models/ComboProperty.cpp
index 3fd0ef87046..c2ad7bc52ff 100644
--- a/GUI/Models/ComboProperty.cpp
+++ b/GUI/Models/ComboProperty.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/Models/ComboProperty.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 namespace {
 const QString value_separator = ";";
@@ -43,9 +43,9 @@ QString ComboProperty::getValue() const
 void ComboProperty::setValue(const QString& name)
 {
     if (!m_values.contains(name))
-        throw GUIHelpers::Error("ComboProperty::setValue() -> Error. Combo doesn't contain "
-                                "value "
-                                + name);
+        throw Error("ComboProperty::setValue() -> Error. Combo doesn't contain "
+                    "value "
+                    + name);
     setCurrentIndex(m_values.indexOf(name));
 }
 
@@ -83,8 +83,8 @@ int ComboProperty::currentIndex() const
 void ComboProperty::setCurrentIndex(int index)
 {
     if (index < 0 || index >= m_values.size())
-        throw GUIHelpers::Error("ComboProperty::setCurrentIndex(int index) -> Error. "
-                                "Invalid index");
+        throw Error("ComboProperty::setCurrentIndex(int index) -> Error. "
+                    "Invalid index");
     m_selected_indices.clear();
     m_selected_indices.push_back(index);
 }
diff --git a/GUI/Models/Data1DViewItem.cpp b/GUI/Models/Data1DViewItem.cpp
index d507a5853cc..e54ef9e43f3 100644
--- a/GUI/Models/Data1DViewItem.cpp
+++ b/GUI/Models/Data1DViewItem.cpp
@@ -19,8 +19,8 @@
 #include "GUI/Models/DataProperties.h"
 #include "GUI/Models/DataPropertyContainer.h"
 #include "GUI/Models/DataViewUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItem.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 const QString x_axis_default_name = "X [nbins]";
@@ -142,7 +142,7 @@ void Data1DViewItem::setAxesRangeToData()
 void Data1DViewItem::resetToDefault()
 {
     // TODO: implement when applying DataITem1DView in ImportView
-    throw GUIHelpers::Error("Error in DataItem1DView::resetToDefault: not implemented");
+    throw Error("Error in DataItem1DView::resetToDefault: not implemented");
 }
 
 QPair<QVector<double>, QVector<double>> Data1DViewItem::graphData(Data1DProperties* property_item)
@@ -174,7 +174,7 @@ JobItem* Data1DViewItem::jobItem()
             return m_job_item;
         }
     } while ((item = item->parent()));
-    throw GUIHelpers::Error(
+    throw Error(
         "Error in DataItem1DView::jobItem: passed item is not owned by any job item");
 }
 
diff --git a/GUI/Models/DataItem.cpp b/GUI/Models/DataItem.cpp
index 2d08650fbc5..fcda670d795 100644
--- a/GUI/Models/DataItem.cpp
+++ b/GUI/Models/DataItem.cpp
@@ -15,7 +15,7 @@
 #include "GUI/Models/DataItem.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
 #include "GUI/Models/ComboProperty.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 #include "GUI/utils/ImportDataInfo.h"
 
 const QString DataItem::P_FILE_NAME = "FileName";
@@ -30,8 +30,8 @@ void DataItem::setOutputData(OutputData<double>* data)
 void DataItem::setRawDataVector(std::vector<double> data)
 {
     if (m_data->getAllocatedSize() != data.size())
-        throw GUIHelpers::Error("DataItem::setRawDataVector() -> Error. "
-                                "Different data size.");
+        throw Error("DataItem::setRawDataVector() -> Error. "
+                    "Different data size.");
     std::unique_lock<std::mutex> lock(m_update_data_mutex);
     m_data->setRawDataVector(std::move(data));
     emitDataChanged();
diff --git a/GUI/Models/DataItemUtils.cpp b/GUI/Models/DataItemUtils.cpp
index 841e8d90cb3..38ad5b63137 100644
--- a/GUI/Models/DataItemUtils.cpp
+++ b/GUI/Models/DataItemUtils.cpp
@@ -13,11 +13,11 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/DataItemUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/JobItem.h"
 #include "GUI/Models/RealDataItem.h"
 #include "GUI/Models/SpecularDataItem.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 template <class DataItemType> DataItemType* dataItem(SessionItem* parent)
@@ -31,7 +31,7 @@ template <class DataItemType> DataItemType* dataItem(SessionItem* parent)
     else if (auto self = dynamic_cast<DataItemType*>(parent))
         return self;
 
-    throw GUIHelpers::Error("Error in DataItemUtils::dataItem: unexpected item passed.");
+    throw Error("Error in DataItemUtils::dataItem: unexpected item passed.");
 }
 } // namespace
 
diff --git a/GUI/Models/DataProperties.cpp b/GUI/Models/DataProperties.cpp
index 94f068c2c66..8fb2c35296b 100644
--- a/GUI/Models/DataProperties.cpp
+++ b/GUI/Models/DataProperties.cpp
@@ -15,9 +15,10 @@
 #include "GUI/Models/DataProperties.h"
 #include "GUI/Models/ComboProperty.h"
 #include "GUI/Models/DataItem.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ModelPath.h"
 #include "GUI/Models/SessionModel.h"
-#include "GUI/utils/GUIHelpers.h"
+#include <QColor>
 
 namespace {
 // set of simple colors for representation of 1D graphs
@@ -61,7 +62,7 @@ DataItem* DataProperties::dataItem()
         std::stringstream os;
         os << "Error in DataProperties::dataItem: index produced by path";
         os << path.toStdString() << " is invalid" << std::endl;
-        throw GUIHelpers::Error(QString::fromStdString(os.str()));
+        throw Error(QString::fromStdString(os.str()));
     }
     auto item = hosting_model->itemForIndex(item_index);
     return dynamic_cast<DataItem*>(item);
@@ -80,7 +81,7 @@ QColor Data1DProperties::color()
     auto iter =
         std::find_if(color_queue.begin(), color_queue.end(), ColorNameComparator(color_name));
     if (iter == color_queue.end())
-        throw GUIHelpers::Error("Error in Data1DPresentationProperties::color: unknown color name");
+        throw Error("Error in Data1DPresentationProperties::color: unknown color name");
     return QColor(iter->second);
 }
 
diff --git a/GUI/Models/DataPropertyContainer.cpp b/GUI/Models/DataPropertyContainer.cpp
index 68689b01499..a3daab4d02d 100644
--- a/GUI/Models/DataPropertyContainer.cpp
+++ b/GUI/Models/DataPropertyContainer.cpp
@@ -15,7 +15,7 @@
 #include "GUI/Models/DataPropertyContainer.h"
 #include "GUI/Models/DataItem.h"
 #include "GUI/Models/DataProperties.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 const QString DataPropertyContainer::T_CHILDREN = "data links";
 
@@ -55,7 +55,7 @@ DataItem* DataPropertyContainer::basicDataItem()
 void DataPropertyContainer::addItem(DataItem* data_item)
 {
     if (this->model() != data_item->model())
-        throw GUIHelpers::Error(
+        throw Error(
             "Error in DataPropertyContainer::addItem: hosting models are different");
 
     auto property_items = propertyItems();
diff --git a/GUI/Models/DomainObjectBuilder.cpp b/GUI/Models/DomainObjectBuilder.cpp
index 8b4f85314fd..2e1e96a2b73 100644
--- a/GUI/Models/DomainObjectBuilder.cpp
+++ b/GUI/Models/DomainObjectBuilder.cpp
@@ -19,13 +19,13 @@
 #include "Device/Instrument/CoordSystem2D.h"
 #include "GUI/Models/AxesItems.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/InterferenceFunctionItems.h"
 #include "GUI/Models/LayerItem.h"
 #include "GUI/Models/ParticleLayoutItem.h"
 #include "GUI/Models/SpecularBeamInclinationItem.h"
 #include "GUI/Models/TransformToDomain.h"
-#include "GUI/utils/GUIHelpers.h"
 
 std::unique_ptr<MultiLayer> DomainObjectBuilder::buildMultiLayer(const SessionItem& multilayer_item)
 {
@@ -73,8 +73,8 @@ std::unique_ptr<ParticleLayout> DomainObjectBuilder::buildParticleLayout(const S
             continue;
         }
 
-        throw GUIHelpers::Error("DomainObjectBuilder::buildParticleLayout()"
-                                " -> Error! Not implemented");
+        throw Error("DomainObjectBuilder::buildParticleLayout()"
+                    " -> Error! Not implemented");
     }
     QVector<SessionItem*> interferences = item.getItems(ParticleLayoutItem::T_INTERFERENCE);
     for (int i = 0; i < interferences.size(); i++) {
diff --git a/GUI/Models/DomainSimulationBuilder.cpp b/GUI/Models/DomainSimulationBuilder.cpp
index a3a0ce6fc2c..a44306a33c0 100644
--- a/GUI/Models/DomainSimulationBuilder.cpp
+++ b/GUI/Models/DomainSimulationBuilder.cpp
@@ -22,13 +22,13 @@
 #include "GUI/Models/BackgroundItems.h"
 #include "GUI/Models/DetectorItems.h"
 #include "GUI/Models/DomainObjectBuilder.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FootprintItems.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/MultiLayerItem.h"
 #include "GUI/Models/SimulationOptionsItem.h"
 #include "GUI/Models/SpecularBeamInclinationItem.h"
 #include "GUI/Models/TransformToDomain.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 
@@ -139,7 +139,7 @@ DomainSimulationBuilder::createSimulation(const MultiLayerItem* sampleItem,
     if (sampleItem == nullptr || instrumentItem == nullptr) {
         QString message("DomainSimulationBuilder::getSimulation() -> Error. Either MultiLayerItem "
                         " or InstrumentItem is not defined.");
-        throw GUIHelpers::Error(message);
+        throw Error(message);
     }
 
     auto P_multilayer = DomainObjectBuilder::buildMultiLayer(*sampleItem);
@@ -154,6 +154,6 @@ DomainSimulationBuilder::createSimulation(const MultiLayerItem* sampleItem,
     else if (auto penetrator = dynamic_cast<const DepthProbeInstrumentItem*>(instrumentItem))
         return createDepthProbeSimulation(std::move(P_multilayer), penetrator, optionsItem);
 
-    throw GUIHelpers::Error(
+    throw Error(
         "DomainSimulationBuilder::createSimulation() -> Error. Not yet implemented");
 }
diff --git a/GUI/Models/Error.cpp b/GUI/Models/Error.cpp
new file mode 100644
index 00000000000..27359a2d60d
--- /dev/null
+++ b/GUI/Models/Error.cpp
@@ -0,0 +1,24 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Models/Error.cpp
+//! @brief     Implements Error class
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Models/Error.h"
+
+Error::Error(const QString& message) noexcept
+    : m_messageAsLatin1(message.toLatin1())
+{}
+
+const char* Error::what() const noexcept
+{
+    return m_messageAsLatin1.data();
+}
diff --git a/GUI/Models/Error.h b/GUI/Models/Error.h
new file mode 100644
index 00000000000..b13f097e1b2
--- /dev/null
+++ b/GUI/Models/Error.h
@@ -0,0 +1,30 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Models/Error.h
+//! @brief     Defines error class
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_MODELS_ERROR_H
+#define BORNAGAIN_GUI_MODELS_ERROR_H
+
+#include <QString>
+#include <QByteArray>
+
+class Error : public std::exception {
+public:
+    explicit Error(const QString& message) noexcept;
+    const char* what() const noexcept override;
+
+private:
+    QByteArray m_messageAsLatin1;
+};
+
+#endif // BORNAGAIN_GUI_MODELS_ERROR_H
diff --git a/GUI/Models/FitParameterItems.cpp b/GUI/Models/FitParameterItems.cpp
index cfbdc863b6e..e9553ef7bf4 100644
--- a/GUI/Models/FitParameterItems.cpp
+++ b/GUI/Models/FitParameterItems.cpp
@@ -15,10 +15,10 @@
 #include "GUI/Models/FitParameterItems.h"
 #include "Fit/Param/Parameters.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItem.h"
 #include "GUI/Models/ModelPath.h"
 #include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <cmath>
 
 namespace {
@@ -138,7 +138,7 @@ AttLimits FitParameterItem::attLimits() const
     }
 
     else {
-        throw GUIHelpers::Error("FitParameterItem::attLimits() -> Error. Unknown limit type");
+        throw Error("FitParameterItem::attLimits() -> Error. Unknown limit type");
     }
 }
 
@@ -305,7 +305,7 @@ mumufit::Parameters FitParameterContainerItem::createParameters() const
                   "or (min, max) range in fitting parameter par"
                << index;
             std::string message = ss.str();
-            throw GUIHelpers::Error(QString::fromStdString(ss.str()));
+            throw Error(QString::fromStdString(ss.str()));
         }
         double startValue = fitPar->getItemValue(FitParameterItem::P_START_VALUE).toDouble();
         AttLimits limits = fitPar->attLimits();
diff --git a/GUI/Models/FitParameterProxyModel.cpp b/GUI/Models/FitParameterProxyModel.cpp
index ed8af4e5079..7ab7a38e7d7 100644
--- a/GUI/Models/FitParameterProxyModel.cpp
+++ b/GUI/Models/FitParameterProxyModel.cpp
@@ -13,12 +13,13 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/FitParameterProxyModel.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FitParameterHelper.h"
 #include "GUI/Models/FitParameterItems.h"
 #include "GUI/Models/JobModel.h"
 #include "GUI/Models/ModelPath.h"
 #include "GUI/Models/SessionItemUtils.h"
-#include "GUI/utils/GUIHelpers.h"
+#include <QColor>
 #include <QMimeData>
 
 using SessionItemUtils::ParentRow;
@@ -38,7 +39,7 @@ FitParameterProxyModel::FitParameterProxyModel(FitParameterContainerItem* fitPar
     m_root_item->mapper()->setOnItemDestroy(
         [this](SessionItem* parentItem) {
             if (parentItem != m_root_item) {
-                throw GUIHelpers::Error(
+                throw Error(
                     "FitParameterProxyModel::FitParameterProxyModel() -> Error. "
                     "Wrong item reported.");
             }
diff --git a/GUI/Models/GUIDomainSampleVisitor.cpp b/GUI/Models/GUIDomainSampleVisitor.cpp
index a8f07ff19ba..badf6f60f9b 100644
--- a/GUI/Models/GUIDomainSampleVisitor.cpp
+++ b/GUI/Models/GUIDomainSampleVisitor.cpp
@@ -15,6 +15,7 @@
 #include "GUI/Models/GUIDomainSampleVisitor.h"
 #include "Base/Const/Units.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FormFactorItems.h"
 #include "GUI/Models/InterferenceFunctionItems.h"
 #include "GUI/Models/LayerItem.h"
@@ -30,7 +31,6 @@
 #include "GUI/Models/TransformationItem.h"
 #include "GUI/Models/VectorItem.h"
 #include "GUI/Views/MaterialEditor/MaterialItemUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Param/Node/NodeUtils.h"
 #include "Sample/Aggregate/ParticleLayout.h"
 #include "Sample/HardParticle/HardParticles.h"
@@ -54,8 +54,8 @@ SessionItem* AddFormFactorItem(SessionItem* parent, const QString& model_type)
     else if (parent_type == "MesoCrystal")
         property_name = MesoCrystalItem::P_OUTER_SHAPE;
     if (property_name.isEmpty())
-        throw GUIHelpers::Error("AddFormFactorItem: parent is neither ParticleItem or "
-                                "MesoCrystalItem");
+        throw Error("AddFormFactorItem: parent is neither ParticleItem or "
+                    "MesoCrystalItem");
     return parent->setGroupProperty(property_name, model_type);
 }
 } // namespace
@@ -157,8 +157,8 @@ void GUIDomainSampleVisitor::visit(const Crystal* sample)
     SessionItem* mesocrystal_item = m_levelToParentItem[depth() - 1];
     ASSERT(mesocrystal_item);
     if (mesocrystal_item->modelType() != "MesoCrystal") {
-        throw GUIHelpers::Error("GUIObjectBuilder::visit(const Crystal*) "
-                                "-> Error. Parent is not a MesoCrystal");
+        throw Error("GUIObjectBuilder::visit(const Crystal*) "
+                    "-> Error. Parent is not a MesoCrystal");
     }
     auto lattice = sample->transformedLattice();
     auto vector_a = lattice.getBasisVectorA();
@@ -581,8 +581,8 @@ ExternalProperty GUIDomainSampleVisitor::createMaterialFromDomain(const Material
         materialItem = m_materialModel->addSLDMaterial(materialName, material_data.real(),
                                                        material_data.imag());
     } else {
-        throw GUIHelpers::Error("GUIObjectBuilder::createMaterialFromDomain() -> Error. "
-                                "Unsupported material");
+        throw Error("GUIObjectBuilder::createMaterialFromDomain() -> Error. "
+                    "Unsupported material");
     }
 
     materialItem->setMagnetization(material->magnetization());
@@ -606,8 +606,8 @@ SessionItem* GUIDomainSampleVisitor::InsertIParticle(const IParticle* particle,
             } else if (particle == coreshell->shellParticle()) {
                 tag = ParticleCoreShellItem::T_SHELL;
             } else {
-                throw GUIHelpers::Error("GUIObjectBuilder::InsertIParticle:"
-                                        "Particle not found in parent ParticleCoreShell");
+                throw Error("GUIObjectBuilder::InsertIParticle:"
+                            "Particle not found in parent ParticleCoreShell");
             }
         }
     }
diff --git a/GUI/Models/GUIObjectBuilder.cpp b/GUI/Models/GUIObjectBuilder.cpp
index 25996116492..98575191a4c 100644
--- a/GUI/Models/GUIObjectBuilder.cpp
+++ b/GUI/Models/GUIObjectBuilder.cpp
@@ -17,13 +17,13 @@
 #include "Core/Simulation/includeSimulations.h"
 #include "GUI/Models/AxesItems.h"
 #include "GUI/Models/DocumentModel.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/GUIDomainSampleVisitor.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/InstrumentModel.h"
 #include "GUI/Models/SampleModel.h"
 #include "GUI/Models/SimulationOptionsItem.h"
 #include "GUI/Models/TransformFromDomain.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Sample/Multilayer/MultiLayer.h"
 
 namespace {
@@ -77,8 +77,8 @@ SessionItem* GUIObjectBuilder::populateInstrumentModel(InstrumentModel* p_instru
         return createSpecularInstrumentItem(p_instrument_model, *spec_simulation, name);
     }
 
-    throw GUIHelpers::Error("GUIObjectBuilder::populateInstrumentModel() -> Error. ISimulation is "
-                            "not yet supported");
+    throw Error("GUIObjectBuilder::populateInstrumentModel() -> Error. ISimulation is "
+                "not yet supported");
 }
 
 SessionItem* GUIObjectBuilder::populateDocumentModel(DocumentModel* p_document_model,
diff --git a/GUI/Models/GroupInfo.cpp b/GUI/Models/GroupInfo.cpp
index 8142091f0a8..882d2203b04 100644
--- a/GUI/Models/GroupInfo.cpp
+++ b/GUI/Models/GroupInfo.cpp
@@ -13,7 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/GroupInfo.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 GroupInfo::GroupInfo(const QString& groupType, bool is_sorted)
     : m_groupType(groupType), is_sorted(is_sorted)
@@ -23,12 +23,12 @@ GroupInfo::GroupInfo(const QString& groupType, bool is_sorted)
 void GroupInfo::add(const QString& itemType, const QString& itemLabel)
 {
     if (groupType().isEmpty())
-        throw GUIHelpers::Error("GroupInfo::add() -> Error. Empty group name");
+        throw Error("GroupInfo::add() -> Error. Empty group name");
 
     if (containsType(itemType))
-        throw GUIHelpers::Error("GroupInfo::add() -> Error. "
-                                "Model type '"
-                                + itemType + "' already exists.");
+        throw Error("GroupInfo::add() -> Error. "
+                    "Model type '"
+                    + itemType + "' already exists.");
 
     m_info.push_back({itemType, itemLabel});
 
@@ -47,7 +47,7 @@ QString GroupInfo::defaultType() const
 void GroupInfo::setDefaultType(const QString& modelType)
 {
     if (!containsType(modelType))
-        throw GUIHelpers::Error("GroupInfo::add() -> Error. No such type '" + modelType + "'");
+        throw Error("GroupInfo::add() -> Error. No such type '" + modelType + "'");
 
     m_defaultItemType = modelType;
 }
diff --git a/GUI/Models/GroupInfoCatalog.cpp b/GUI/Models/GroupInfoCatalog.cpp
index e91ee032db4..87fae3c95e3 100644
--- a/GUI/Models/GroupInfoCatalog.cpp
+++ b/GUI/Models/GroupInfoCatalog.cpp
@@ -15,10 +15,10 @@
 #include "GUI/Models/GroupInfoCatalog.h"
 #include "GUI/Models/AxesItems.h"
 #include "GUI/Models/DistributionItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/MaterialDataItems.h"
 #include "GUI/Models/PointwiseAxisItem.h"
 #include "GUI/Models/RealLimitsItems.h"
-#include "GUI/utils/GUIHelpers.h"
 
 GroupInfoCatalog::GroupInfoCatalog()
 {
@@ -209,8 +209,8 @@ GroupInfo GroupInfoCatalog::groupInfo(const QString& groupType) const
         if (info.groupType() == groupType)
             return info;
 
-    throw GUIHelpers::Error("GroupInfoCatalog::groupInfo() -> Error. No such group '" + groupType
-                            + "'");
+    throw Error("GroupInfoCatalog::groupInfo() -> Error. No such group '" + groupType
+                + "'");
 }
 
 bool GroupInfoCatalog::containsGroup(const QString& groupType) const
@@ -225,8 +225,8 @@ bool GroupInfoCatalog::containsGroup(const QString& groupType) const
 void GroupInfoCatalog::addInfo(const GroupInfo& info)
 {
     if (containsGroup(info.groupType()))
-        throw GUIHelpers::Error("GroupInfoCatalog::addInfo -> Error. Already exists '"
-                                + info.groupType() + "'");
+        throw Error("GroupInfoCatalog::addInfo -> Error. Already exists '"
+                    + info.groupType() + "'");
 
     m_groups.push_back(info);
 }
diff --git a/GUI/Models/GroupItem.cpp b/GUI/Models/GroupItem.cpp
index 4d828fc77ee..e70959f193a 100644
--- a/GUI/Models/GroupItem.cpp
+++ b/GUI/Models/GroupItem.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/ComboProperty.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 const QString GroupItem::T_ITEMS = "Item tag";
 
@@ -31,7 +31,7 @@ GroupItem::~GroupItem() = default;
 void GroupItem::setGroupInfo(const GroupInfo& groupInfo)
 {
     if (m_controller)
-        throw GUIHelpers::Error("GroupItem::setGroup() -> Error. Attempt to set group twice.");
+        throw Error("GroupItem::setGroup() -> Error. Attempt to set group twice.");
 
     m_controller = std::make_unique<GroupItemController>(this, groupInfo);
     updateComboValue();
@@ -62,7 +62,7 @@ SessionItem* GroupItem::getItemOfType(const QString& type)
 void GroupItem::onValueChange()
 {
     if (!value().canConvert<ComboProperty>())
-        throw GUIHelpers::Error("GroupItem::onValueChange() -> Error. Wrong property type");
+        throw Error("GroupItem::onValueChange() -> Error. Wrong property type");
 
     ComboProperty property = value().value<ComboProperty>();
     if (property.currentIndex() != m_controller->currentIndex()) {
diff --git a/GUI/Models/InstrumentItems.cpp b/GUI/Models/InstrumentItems.cpp
index cd2f50eb6c6..9799308f92b 100644
--- a/GUI/Models/InstrumentItems.cpp
+++ b/GUI/Models/InstrumentItems.cpp
@@ -25,6 +25,7 @@
 #include "GUI/Models/BeamWavelengthItem.h"
 #include "GUI/Models/DataItem.h"
 #include "GUI/Models/DetectorItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/ItemFileNameUtils.h"
 #include "GUI/Models/JobItemUtils.h"
@@ -160,8 +161,8 @@ std::vector<int> SpecularInstrumentItem::shape() const
 void SpecularInstrumentItem::updateToRealData(const RealDataItem* item)
 {
     if (shape().size() != item->shape().size())
-        throw GUIHelpers::Error("Error in SpecularInstrumentItem::updateToRealData: The type "
-                                "of instrument is incompatible with passed data shape.");
+        throw Error("Error in SpecularInstrumentItem::updateToRealData: The type "
+                    "of instrument is incompatible with passed data shape.");
 
     const auto& data = item->nativeOutputData()->axis(0);
     beamItem()->updateToData(data, item->nativeDataUnits());
@@ -284,8 +285,8 @@ void GISASInstrumentItem::updateToRealData(const RealDataItem* item)
 
     const auto data_shape = item->shape();
     if (shape().size() != data_shape.size())
-        throw GUIHelpers::Error("Error in GISASInstrumentItem::updateToRealData: The type of "
-                                "instrument is incompatible with passed data shape.");
+        throw Error("Error in GISASInstrumentItem::updateToRealData: The type of "
+                    "instrument is incompatible with passed data shape.");
     detectorItem()->setXSize(data_shape[0]);
     detectorItem()->setYSize(data_shape[1]);
 }
@@ -334,8 +335,8 @@ void OffSpecularInstrumentItem::updateToRealData(const RealDataItem* dataItem)
 
     const auto data_shape = dataItem->shape();
     if (shape().size() != data_shape.size())
-        throw GUIHelpers::Error("Error in OffSpecularInstrumentItem::updateToRealData: The type of "
-                                "instrument is incompatible with passed data shape.");
+        throw Error("Error in OffSpecularInstrumentItem::updateToRealData: The type of "
+                    "instrument is incompatible with passed data shape.");
 
     item<BasicAxisItem>(P_ALPHA_AXIS)->setBinCount(data_shape[0]);
     detectorItem()->setYSize(data_shape[1]);
diff --git a/GUI/Models/IntensityDataItem.cpp b/GUI/Models/IntensityDataItem.cpp
index c930e375691..272f0e3572c 100644
--- a/GUI/Models/IntensityDataItem.cpp
+++ b/GUI/Models/IntensityDataItem.cpp
@@ -14,13 +14,13 @@
 
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/AxesItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItemUtils.h"
 #include "GUI/Models/MaskItems.h"
 #include "GUI/Models/ProjectionItems.h"
 #include "GUI/Models/SessionModel.h"
 #include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
 #include "GUI/Views/MaskWidgets/MaskUnitsConverter.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 ComboProperty gradientCombo()
@@ -88,7 +88,7 @@ void IntensityDataItem::setOutputData(OutputData<double>* data)
 {
     ASSERT(data && "Assertion failed in IntensityDataItem::setOutputData: nullptr data passed");
     if (data->rank() != 2)
-        throw GUIHelpers::Error(
+        throw Error(
             "Error in IntensityDataItem::setOutputData: cannot handle non-2D data");
     DataItem::setOutputData(data);
 
diff --git a/GUI/Models/ItemCatalog.cpp b/GUI/Models/ItemCatalog.cpp
index 34342b48720..ffbe07b272d 100644
--- a/GUI/Models/ItemCatalog.cpp
+++ b/GUI/Models/ItemCatalog.cpp
@@ -19,6 +19,7 @@
 #include "GUI/Models/Data1DViewItem.h"
 #include "GUI/Models/DataProperties.h"
 #include "GUI/Models/DataPropertyContainer.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FTDecayFunctionItems.h"
 #include "GUI/Models/FTDistributionItems.h"
 #include "GUI/Models/FitParameterItems.h"
@@ -59,7 +60,6 @@
 #include "GUI/Models/SphericalDetectorItem.h"
 #include "GUI/Models/TransformationItem.h"
 #include "GUI/Models/VectorItem.h"
-#include "GUI/utils/GUIHelpers.h"
 
 ItemCatalog::ItemCatalog()
 {
@@ -244,8 +244,8 @@ ItemCatalog::ItemCatalog()
 std::unique_ptr<SessionItem> ItemCatalog::createItemPtr(const QString& modelType) const
 {
     if (!m_data.contains(modelType))
-        throw GUIHelpers::Error("ItemFactory::createItem() -> Error: Model name does not exist: "
-                                + modelType);
+        throw Error("ItemFactory::createItem() -> Error: Model name does not exist: "
+                    + modelType);
 
     return m_data.createItemPtr(modelType);
 }
diff --git a/GUI/Models/JobModelFunctions.cpp b/GUI/Models/JobModelFunctions.cpp
index 39e4afb4a38..1d8a918b5a4 100644
--- a/GUI/Models/JobModelFunctions.cpp
+++ b/GUI/Models/JobModelFunctions.cpp
@@ -20,6 +20,7 @@
 #include "GUI/Models/DataPropertyContainer.h"
 #include "GUI/Models/DetectorItems.h"
 #include "GUI/Models/DomainObjectBuilder.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FitParameterItems.h"
 #include "GUI/Models/FitSuiteItem.h"
 #include "GUI/Models/GroupItem.h"
@@ -151,8 +152,8 @@ void JobModelFunctions::setupJobItemOutput(JobItem* jobItem)
     else if (isIntensityInstrument)
         jobItem->model()->insertItem<IntensityDataItem>(jobItem, -1, JobItem::T_OUTPUT);
     else
-        throw GUIHelpers::Error("JobModelFunctions::setupJobItemOutput() -> Error. "
-                                "Unsupported instrument type");
+        throw Error("JobModelFunctions::setupJobItemOutput() -> Error. "
+                    "Unsupported instrument type");
 }
 
 //! Setups JobItem for fit.
@@ -160,8 +161,8 @@ void JobModelFunctions::setupJobItemOutput(JobItem* jobItem)
 void JobModelFunctions::setupJobItemForFit(JobItem* jobItem, const RealDataItem* realDataItem)
 {
     if (!jobItem->instrumentItem())
-        throw GUIHelpers::Error("JobModelFunctions::processInstrumentLink() -> Error. "
-                                "No instrument.");
+        throw Error("JobModelFunctions::processInstrumentLink() -> Error. "
+                    "No instrument.");
 
     copyRealDataItem(jobItem, realDataItem);
     processInstrumentLink(jobItem);
@@ -223,7 +224,7 @@ void processInstrumentLink(JobItem* jobItem)
 {
     RealDataItem* realData = jobItem->realDataItem();
     if (!realData)
-        throw GUIHelpers::Error("JobModelFunctions::processInstrumentLink() -> Error. No data.");
+        throw Error("JobModelFunctions::processInstrumentLink() -> Error. No data.");
 
     realData->setInstrumentId(jobItem->instrumentItem()->id());
     realData->updateToInstrument(jobItem->instrumentItem());
@@ -261,8 +262,8 @@ void createFitContainers(JobItem* jobItem)
 
     SessionItem* fitSuiteItem = jobItem->getItem(JobItem::T_FIT_SUITE);
     if (fitSuiteItem != nullptr) {
-        throw GUIHelpers::Error("JobModel::createFitContainers() -> Error. Attempt to create "
-                                "a second FitSuiteItem.");
+        throw Error("JobModel::createFitContainers() -> Error. Attempt to create "
+                    "a second FitSuiteItem.");
     }
 
     fitSuiteItem = model->insertItem<FitSuiteItem>(jobItem, -1, JobItem::T_FIT_SUITE);
@@ -270,8 +271,8 @@ void createFitContainers(JobItem* jobItem)
     SessionItem* parsContainerItem =
         fitSuiteItem->getItem(FitSuiteItem::T_FIT_PARAMETERS_CONTAINER);
     if (parsContainerItem != nullptr) {
-        throw GUIHelpers::Error("JobModel::createFitContainers() -> Error. Attempt to create "
-                                "a second FitParameterContainer.");
+        throw Error("JobModel::createFitContainers() -> Error. Attempt to create "
+                    "a second FitParameterContainer.");
     }
 
     model->insertItem<FitParameterContainerItem>(fitSuiteItem, -1,
@@ -280,8 +281,8 @@ void createFitContainers(JobItem* jobItem)
     // Minimizer settings
     SessionItem* minimizerContainerItem = fitSuiteItem->getItem(FitSuiteItem::T_MINIMIZER);
     if (minimizerContainerItem != nullptr) {
-        throw GUIHelpers::Error("JobModel::createFitContainers() -> Error. Attempt to create "
-                                "a second MinimizerContainer.");
+        throw Error("JobModel::createFitContainers() -> Error. Attempt to create "
+                    "a second MinimizerContainer.");
     }
 
     model->insertItem<MinimizerContainerItem>(fitSuiteItem, -1, FitSuiteItem::T_MINIMIZER);
diff --git a/GUI/Models/JobQueueData.cpp b/GUI/Models/JobQueueData.cpp
index 5ddb8f3bd17..5f269176ab6 100644
--- a/GUI/Models/JobQueueData.cpp
+++ b/GUI/Models/JobQueueData.cpp
@@ -15,6 +15,7 @@
 #include "GUI/Models/JobQueueData.h"
 #include "Core/Simulation/GISASSimulation.h"
 #include "GUI/Models/DomainSimulationBuilder.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/JobItem.h"
 #include "GUI/Models/JobModel.h"
@@ -41,7 +42,7 @@ void JobQueueData::runJob(JobItem* jobItem)
         return;
 
     if (getSimulation(identifier))
-        throw GUIHelpers::Error(
+        throw Error(
             "JobQueueData::runJob() -> Error. ISimulation is already existing.");
 
     try {
@@ -193,7 +194,7 @@ void JobQueueData::assignForDeletion(QThread* thread)
         }
     }
 
-    throw GUIHelpers::Error("JobQueueData::assignForDeletion() -> Error! Can't find thread.");
+    throw Error("JobQueueData::assignForDeletion() -> Error! Can't find thread.");
 }
 
 //! Removes JobRunner from the map of known runners, assigns it for deletion.
@@ -210,7 +211,7 @@ void JobQueueData::assignForDeletion(JobWorker* worker)
         }
     }
 
-    throw GUIHelpers::Error("JobQueueData::assignForDeletion() -> Error! Can't find the runner.");
+    throw Error("JobQueueData::assignForDeletion() -> Error! Can't find the runner.");
 }
 
 void JobQueueData::clearSimulation(const QString& identifier)
diff --git a/GUI/Models/MaskItems.cpp b/GUI/Models/MaskItems.cpp
index cce94698b92..e971d6969b3 100644
--- a/GUI/Models/MaskItems.cpp
+++ b/GUI/Models/MaskItems.cpp
@@ -18,7 +18,7 @@
 #include "Device/Mask/Line.h"
 #include "Device/Mask/Polygon.h"
 #include "Device/Mask/Rectangle.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 MaskContainerItem::MaskContainerItem() : SessionItem("MaskContainer")
 {
@@ -48,7 +48,7 @@ MaskItem::MaskItem(const QString& name) : SessionItem(name)
 std::unique_ptr<IShape2D> MaskItem::createShape(double scale) const
 {
     Q_UNUSED(scale);
-    throw GUIHelpers::Error("MaskItem::createShape() -> Not implemented.");
+    throw Error("MaskItem::createShape() -> Not implemented.");
 }
 
 /* ------------------------------------------------------------------------- */
diff --git a/GUI/Models/MaterialItem.cpp b/GUI/Models/MaterialItem.cpp
index aa95bfd01eb..7ec6fcce27e 100644
--- a/GUI/Models/MaterialItem.cpp
+++ b/GUI/Models/MaterialItem.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/MaterialDataItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItemUtils.h"
 #include "GUI/Models/VectorItem.h"
 #include "GUI/Views/MaterialEditor/MaterialItemUtils.h"
@@ -141,6 +142,6 @@ std::unique_ptr<Material> MaterialItem::createMaterial() const
         return std::make_unique<Material>(MaterialBySLD(name, sld_real, sld_imag, magnetization));
     }
 
-    throw GUIHelpers::Error("MaterialItem::createMaterial() -> Error. "
-                            "Not implemented material type");
+    throw Error("MaterialItem::createMaterial() -> Error. "
+                "Not implemented material type");
 }
diff --git a/GUI/Models/MesoCrystalItem.cpp b/GUI/Models/MesoCrystalItem.cpp
index 9a4be55f339..ca035860963 100644
--- a/GUI/Models/MesoCrystalItem.cpp
+++ b/GUI/Models/MesoCrystalItem.cpp
@@ -14,6 +14,7 @@
 
 #include "GUI/Models/MesoCrystalItem.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FormFactorItems.h"
 #include "GUI/Models/ModelPath.h"
 #include "GUI/Models/ParticleCompositionItem.h"
@@ -22,7 +23,6 @@
 #include "GUI/Models/SessionItemUtils.h"
 #include "GUI/Models/TransformToDomain.h"
 #include "GUI/Models/VectorItem.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Sample/Particle/Crystal.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
@@ -100,18 +100,18 @@ std::unique_ptr<MesoCrystal> MesoCrystalItem::createMesoCrystal() const
 {
     const Lattice3D& lattice = getLattice();
     if (!(lattice.unitCellVolume() > 0.0))
-        throw GUIHelpers::Error("MesoCrystalItem::createMesoCrystal(): "
-                                "Lattice volume not strictly positive");
+        throw Error("MesoCrystalItem::createMesoCrystal(): "
+                    "Lattice volume not strictly positive");
     std::unique_ptr<IParticle> basis = getBasis();
     if (!basis)
-        throw GUIHelpers::Error("MesoCrystalItem::createMesoCrystal(): "
-                                "No basis particle defined");
+        throw Error("MesoCrystalItem::createMesoCrystal(): "
+                    "No basis particle defined");
     Crystal crystal(*basis, lattice);
 
     std::unique_ptr<IFormFactor> ff = getOuterShape();
     if (!ff)
-        throw GUIHelpers::Error("MesoCrystalItem::createMesoCrystal(): "
-                                "No outer shape defined");
+        throw Error("MesoCrystalItem::createMesoCrystal(): "
+                    "No outer shape defined");
 
     auto result = std::make_unique<MesoCrystal>(crystal, *ff);
     TransformToDomain::setTransformationInfo(result.get(), *this);
diff --git a/GUI/Models/ParameterTreeUtils.cpp b/GUI/Models/ParameterTreeUtils.cpp
index e8d9c286ba8..44813af68f4 100644
--- a/GUI/Models/ParameterTreeUtils.cpp
+++ b/GUI/Models/ParameterTreeUtils.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/ParameterTreeUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FitParameterHelper.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/JobItem.h"
@@ -20,7 +21,6 @@
 #include "GUI/Models/MultiLayerItem.h"
 #include "GUI/Models/ParameterTreeItems.h"
 #include "GUI/Models/SampleModel.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QStack>
 
 namespace {
@@ -75,8 +75,8 @@ void handleItem(SessionItem* tree, const SessionItem* source)
 void populateParameterContainer(SessionItem* container, const SessionItem* source)
 {
     if (container->modelType() != "Parameter Container")
-        throw GUIHelpers::Error("ParameterTreeUtils::populateParameterContainer() -> Error. "
-                                "Not a ParameterContainerType.");
+        throw Error("ParameterTreeUtils::populateParameterContainer() -> Error. "
+                    "Not a ParameterContainerType.");
 
     auto sourceLabel = container->model()->insertItem<ParameterLabelItem>(container);
     handleItem(sourceLabel, source);
diff --git a/GUI/Models/ParticleCoreShellItem.cpp b/GUI/Models/ParticleCoreShellItem.cpp
index 399b7c82782..71b3c58043f 100644
--- a/GUI/Models/ParticleCoreShellItem.cpp
+++ b/GUI/Models/ParticleCoreShellItem.cpp
@@ -13,12 +13,12 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/ParticleCoreShellItem.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ModelPath.h"
 #include "GUI/Models/ParticleItem.h"
 #include "GUI/Models/SessionItemUtils.h"
 #include "GUI/Models/TransformToDomain.h"
 #include "GUI/Models/VectorItem.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 
@@ -78,8 +78,8 @@ std::unique_ptr<ParticleCoreShell> ParticleCoreShellItem::createParticleCoreShel
     if (shell_item)
         P_shell = shell_item->createParticle();
     if (!P_core || !P_shell)
-        throw GUIHelpers::Error("ParticleCoreShellItem::createParticleCoreShell -> Error. Either "
-                                "core or shell particle is undefined.");
+        throw Error("ParticleCoreShellItem::createParticleCoreShell -> Error. Either "
+                    "core or shell particle is undefined.");
     auto P_coreshell = std::make_unique<ParticleCoreShell>(*P_shell, *P_core);
     P_coreshell->setAbundance(abundance);
     TransformToDomain::setTransformationInfo(P_coreshell.get(), *this);
diff --git a/GUI/Models/RealDataItem.cpp b/GUI/Models/RealDataItem.cpp
index a253e727b86..9e0f17ed26b 100644
--- a/GUI/Models/RealDataItem.cpp
+++ b/GUI/Models/RealDataItem.cpp
@@ -16,6 +16,7 @@
 #include "Device/Data/DataUtils.h"
 #include "GUI/DataLoaders/AbstractDataLoader1D.h"
 #include "GUI/DataLoaders/DataLoaders1D.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/InstrumentModel.h"
 #include "GUI/Models/IntensityDataItem.h"
@@ -28,7 +29,6 @@
 #include "GUI/Models/SessionModel.h"
 #include "GUI/Models/SpecularDataItem.h"
 #include "GUI/utils/DeserializationException.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/ImportDataInfo.h"
 #include <QtCore/QXmlStreamReader>
 #include <QtCore/QXmlStreamWriter>
@@ -183,8 +183,8 @@ void RealDataItem::initDataItem(size_t rank, const QString& tag)
     if (data_item != nullptr) {
         if ((rank == 1 && !data_item->is<SpecularDataItem>())
             || (rank == 2 && !data_item->is<IntensityDataItem>()))
-            throw GUIHelpers::Error("Error in RealDataItem::initDataItem: trying to set data "
-                                    "incompatible with underlying data item");
+            throw Error("Error in RealDataItem::initDataItem: trying to set data "
+                        "incompatible with underlying data item");
     } else {
         if (rank == 1)
             model()->insertItem<SpecularDataItem>(this, 0, tag);
diff --git a/GUI/Models/RectangularDetectorItem.cpp b/GUI/Models/RectangularDetectorItem.cpp
index 5230b55a6a2..897be27b9a7 100644
--- a/GUI/Models/RectangularDetectorItem.cpp
+++ b/GUI/Models/RectangularDetectorItem.cpp
@@ -16,9 +16,9 @@
 #include "Device/Detector/RectangularDetector.h"
 #include "GUI/Models/AxesItems.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ResolutionFunctionItems.h"
 #include "GUI/Models/VectorItem.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 const double default_detector_width = 20.0;
@@ -130,7 +130,7 @@ void RectangularDetectorItem::setDetectorAlignment(const QString& alignment)
         getItemValue(RectangularDetectorItem::P_ALIGNMENT).value<ComboProperty>();
 
     if (!combo_property.getValues().contains(alignment))
-        throw GUIHelpers::Error(
+        throw Error(
             "RectangularDetectorItem::setDetectorAlignment -> Unexpected alignment");
 
     combo_property.setValue(alignment);
diff --git a/GUI/Models/SessionItemTags.cpp b/GUI/Models/SessionItemTags.cpp
index 024644fac11..4d44b8c44ee 100644
--- a/GUI/Models/SessionItemTags.cpp
+++ b/GUI/Models/SessionItemTags.cpp
@@ -13,7 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/SessionItemTags.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 //! Register tag with given parameters. Returns true in case of success. Returns
 //! false if parameters are invalid or such tag was already registered.
@@ -62,7 +62,7 @@ int SessionItemTags::tagStartIndex(const QString& tagName) const
             return index;
         index += tag.childCount;
     }
-    throw GUIHelpers::Error("SessionItemTags::tagStartIndex() -> Error. Can';t find start index");
+    throw Error("SessionItemTags::tagStartIndex() -> Error. Can';t find start index");
 }
 
 //! Returns index in SessionItem's m_children corresponding to given row in tagName.
@@ -70,7 +70,7 @@ int SessionItemTags::tagStartIndex(const QString& tagName) const
 int SessionItemTags::indexFromTagRow(const QString& tagName, int row) const
 {
     if (row < 0 || row >= tagInfo(tagName).childCount)
-        throw GUIHelpers::Error("SessionItemTags::tagIndexFromRow() -> Error. Wrong row");
+        throw Error("SessionItemTags::tagIndexFromRow() -> Error. Wrong row");
     return tagStartIndex(tagName) + row;
 }
 
@@ -114,7 +114,7 @@ int SessionItemTags::childMax(const QString& tagName)
 void SessionItemTags::addChild(const QString& tagName)
 {
     if (maximumReached(tagName))
-        throw GUIHelpers::Error("SessionItemTags::addChild() -> Error. Can't exceed maximum"
+        throw Error("SessionItemTags::addChild() -> Error. Can't exceed maximum"
                                 "allowed number of children.");
     tagInfo(tagName).childCount++;
 }
@@ -123,8 +123,8 @@ void SessionItemTags::removeChild(const QString& tagName)
 {
     auto& tag = tagInfo(tagName);
     if (tag.childCount == 0)
-        throw GUIHelpers::Error("SessionItemTags::removeChild() -> Error. Attempt to remove "
-                                "unexisting child.");
+        throw Error("SessionItemTags::removeChild() -> Error. Attempt to remove "
+                    "unexisting child.");
     tag.childCount--;
 }
 
@@ -146,7 +146,7 @@ const SessionItemTags::TagInfo& SessionItemTags::tagInfo(const QString& tagName)
     for (const auto& tag : m_tags)
         if (tag.name == tagName)
             return tag;
-    throw GUIHelpers::Error("SessionItemTags::tagInfo() -> Error. No such tag '" + tagName + "'.");
+    throw Error("SessionItemTags::tagInfo() -> Error. No such tag '" + tagName + "'.");
 }
 
 bool SessionItemTags::maximumReached(const QString& tagName) const
diff --git a/GUI/Models/SessionModel.cpp b/GUI/Models/SessionModel.cpp
index c1fc4494bc9..b3c2c936276 100644
--- a/GUI/Models/SessionModel.cpp
+++ b/GUI/Models/SessionModel.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/SessionModel.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ItemFactory.h"
 #include "GUI/Models/SessionItemTags.h"
 #include "GUI/Models/SessionItemUtils.h"
@@ -275,10 +276,10 @@ SessionItem* SessionModel::insertNewItem(QString model_type, SessionItem* parent
     SessionItem* new_item = ItemFactory::CreateItem(model_type);
 
     if (!new_item)
-        throw GUIHelpers::Error("SessionModel::insertNewItem() -> Wrong model type " + model_type);
+        throw Error("SessionModel::insertNewItem() -> Wrong model type " + model_type);
 
     if (!parent_item->insertItem(row, new_item, tag))
-        throw GUIHelpers::Error("SessionModel::insertNewItem -> Error. Can't insert item");
+        throw Error("SessionModel::insertNewItem -> Error. Can't insert item");
 
     return new_item;
 }
@@ -318,13 +319,13 @@ void SessionModel::load(const QString& filename)
     beginResetModel();
     QFile file(filename);
     if (!file.open(QIODevice::ReadOnly))
-        throw GUIHelpers::Error(file.errorString());
+        throw Error(file.errorString());
     clear();
     m_root_item = ItemFactory::CreateEmptyItem();
     QXmlStreamReader reader(&file);
     SessionXML::readItems(&reader, m_root_item);
     if (reader.hasError())
-        throw GUIHelpers::Error(reader.errorString());
+        throw Error(reader.errorString());
     endResetModel();
 }
 
@@ -332,7 +333,7 @@ void SessionModel::save(const QString& filename)
 {
     QFile file(filename);
     if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
-        throw GUIHelpers::Error(file.errorString());
+        throw Error(file.errorString());
 
     QXmlStreamWriter writer(&file);
     writer.setAutoFormatting(true);
@@ -358,7 +359,7 @@ void SessionModel::readFrom(QXmlStreamReader* reader, MessageService* messageSer
     ASSERT(reader);
 
     if (reader->name() != m_model_tag)
-        throw GUIHelpers::Error("SessionModel::readFrom() -> Format error in p1");
+        throw Error("SessionModel::readFrom() -> Format error in p1");
 
     beginResetModel();
     clear();
@@ -367,7 +368,7 @@ void SessionModel::readFrom(QXmlStreamReader* reader, MessageService* messageSer
 
     SessionXML::readItems(reader, m_root_item, QString(), messageService);
     if (reader->hasError())
-        throw GUIHelpers::Error(reader->errorString());
+        throw Error(reader->errorString());
     endResetModel();
 }
 
@@ -437,7 +438,7 @@ SessionItem* SessionModel::copy(const SessionItem* item_to_copy, SessionItem* ne
 SessionModel* SessionModel::createCopy(SessionItem* parent)
 {
     Q_UNUSED(parent);
-    throw GUIHelpers::Error("SessionModel::createCopy() -> Error. Not implemented.");
+    throw Error("SessionModel::createCopy() -> Error. Not implemented.");
 }
 
 void SessionModel::initFrom(SessionModel* model, SessionItem*)
diff --git a/GUI/Models/SessionXML.cpp b/GUI/Models/SessionXML.cpp
index 255a6ef8686..d9492393687 100644
--- a/GUI/Models/SessionXML.cpp
+++ b/GUI/Models/SessionXML.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ExternalProperty.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/GroupItemController.h"
@@ -20,7 +21,6 @@
 #include "GUI/Models/SessionItemTags.h"
 #include "GUI/Models/SessionModel.h"
 #include "GUI/utils/DeserializationException.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/MessageService.h"
 #include <QtCore/QXmlStreamWriter>
 
@@ -111,8 +111,8 @@ void SessionXML::writeVariant(QXmlStreamWriter* writer, QVariant variant, int ro
             writer->writeAttribute(SessionXML::ParameterExtAttribute, combo.stringOfValues());
 
         } else {
-            throw GUIHelpers::Error("SessionXML::writeVariant: Parameter type not supported "
-                                    + type_name);
+            throw Error("SessionXML::writeVariant: Parameter type not supported "
+                        + type_name);
         }
 
         writer->writeEndElement(); // end ParameterTag
@@ -251,7 +251,7 @@ QString SessionXML::readProperty(QXmlStreamReader* reader, SessionItem* item,
     } else {
         QString message = QString("SessionModel::readProperty: parameter type not supported '"
                                   + parameter_type + "'");
-        throw GUIHelpers::Error(message);
+        throw Error(message);
     }
 
     if (variant.isValid()) {
@@ -267,7 +267,7 @@ void report_error(MessageService* messageService, SessionItem* item, const QStri
     if (messageService) {
         messageService->send_warning(item->model(), message);
     } else {
-        throw GUIHelpers::Error(QString("Warning: ") + message);
+        throw Error(QString("Warning: ") + message);
     }
 }
 
diff --git a/GUI/Models/SpecularDataItem.cpp b/GUI/Models/SpecularDataItem.cpp
index 0ae0a9b1012..2054473ceda 100644
--- a/GUI/Models/SpecularDataItem.cpp
+++ b/GUI/Models/SpecularDataItem.cpp
@@ -14,9 +14,9 @@
 
 #include "GUI/Models/SpecularDataItem.h"
 #include "GUI/Models/AxesItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItemUtils.h"
 #include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 
 const QString SpecularDataItem::P_TITLE = "Title";
 const QString SpecularDataItem::P_XAXIS = "x-axis";
@@ -46,7 +46,7 @@ void SpecularDataItem::setOutputData(OutputData<double>* data)
 {
     if (data != nullptr) {
         if (data->rank() != 1)
-            throw GUIHelpers::Error(
+            throw Error(
                 "Error in SpecularDataItem::setOutputData: cannot handle non-1D data");
         DataItem::setOutputData(data);
         updateAxesZoomLevel();
diff --git a/GUI/Models/TransformFromDomain.cpp b/GUI/Models/TransformFromDomain.cpp
index 12f30eca153..14ecf8eb04a 100644
--- a/GUI/Models/TransformFromDomain.cpp
+++ b/GUI/Models/TransformFromDomain.cpp
@@ -35,6 +35,7 @@
 #include "GUI/Models/BackgroundItems.h"
 #include "GUI/Models/BeamAngleItems.h"
 #include "GUI/Models/BeamWavelengthItem.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FTDecayFunctionItems.h"
 #include "GUI/Models/FTDistributionItems.h"
 #include "GUI/Models/FootprintItems.h"
@@ -50,7 +51,6 @@
 #include "GUI/Models/SpecularBeamInclinationItem.h"
 #include "GUI/Models/SphericalDetectorItem.h"
 #include "GUI/Models/VectorItem.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Param/Distrib/Distributions.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include "Sample/Aggregate/InterferenceFunctions.h"
@@ -306,7 +306,7 @@ void TransformFromDomain::setDetectorGeometry(Instrument2DItem* instrument_item,
         auto item = dynamic_cast<RectangularDetectorItem*>(instrument_item->detectorItem());
         setRectangularDetector(item, *det);
     } else {
-        throw GUIHelpers::Error(
+        throw Error(
             "TransformFromDomain::setDetectorGeometry() -> Unknown detector type.");
     }
 }
@@ -332,12 +332,12 @@ void TransformFromDomain::setDetectorResolution(DetectorItem* detector_item,
             item->setItemValue(ResolutionFunction2DGaussianItem::P_SIGMA_Y,
                                scale * resfunc->getSigmaY());
         } else {
-            throw GUIHelpers::Error("TransformFromDomain::setDetectorResolution() -> Error. "
-                                    "Unknown detector resolution function");
+            throw Error("TransformFromDomain::setDetectorResolution() -> Error. "
+                        "Unknown detector resolution function");
         }
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::setDetectorResolution() -> Error. "
-                                "Not a ConvolutionDetectorResolution function");
+        throw Error("TransformFromDomain::setDetectorResolution() -> Error. "
+                    "Not a ConvolutionDetectorResolution function");
     }
 }
 
@@ -428,7 +428,7 @@ void TransformFromDomain::setRectangularDetector(RectangularDetectorItem* detect
                                     detector.getDirectBeamV0());
 
     } else {
-        throw GUIHelpers::Error(
+        throw Error(
             "TransformFromDomain::setItemFromSample(RectangularDetectorItem* detectorItem "
             "Error. Unknown detector arrangement");
     }
@@ -519,8 +519,8 @@ void TransformFromDomain::setMaskContainer(MaskContainerItem* container_item,
         }
 
         else {
-            throw GUIHelpers::Error("TransformFromDomain::setDetectorMasks() -> Error. "
-                                    "Unknown shape");
+            throw Error("TransformFromDomain::setDetectorMasks() -> Error. "
+                        "Unknown shape");
         }
     }
 
@@ -543,7 +543,7 @@ void TransformFromDomain::setItemFromSample(BeamDistributionItem* beam_distribut
     ASSERT(beam_distribution_item);
 
     if (parameter_distribution.getMinValue() < parameter_distribution.getMaxValue()) {
-        throw GUIHelpers::Error(
+        throw Error(
             "TransformFromDomain::setItemFromSample(BeamDistributionItem* beamDistributionItem,"
             "const ParameterDistribution& parameterDistribution) -> Error. ParameterDistribution "
             "with defined min,max are not yet implemented in GUI");
@@ -582,7 +582,7 @@ void TransformFromDomain::setFootprintFactor(const IFootprintFactor* footprint,
 void TransformFromDomain::setAxisItem(BasicAxisItem* item, const IAxis& axis, double factor)
 {
     if (!dynamic_cast<const FixedBinAxis*>(&axis))
-        throw GUIHelpers::Error("TransformFromDomain::setAxisItem() -> Error. Unexpected axis");
+        throw Error("TransformFromDomain::setAxisItem() -> Error. Unexpected axis");
 
     item->setBinCount(static_cast<int>(axis.size()));
     item->setLowerBound(factor * axis.lowerBound());
@@ -617,7 +617,7 @@ void SetPDF1D(SessionItem* item, const IFTDistribution1D* ipdf, QString group_na
         pdfItem->setItemValue(FTDistribution1DVoigtItem::P_OMEGA, pdf->omega());
         pdfItem->setItemValue(FTDistribution1DVoigtItem::P_ETA, pdf->eta());
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::setPDF1D: -> Error");
+        throw Error("TransformFromDomain::setPDF1D: -> Error");
     }
 }
 
@@ -658,7 +658,7 @@ void setPDF2D(SessionItem* item, const IFTDistribution2D* pdf, QString group_nam
                               Units::rad2deg(pdf_voigt->gamma()));
         pdfItem->setItemValue(FTDistribution2DVoigtItem::P_ETA, pdf_voigt->eta());
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::setPDF2D: -> Error");
+        throw Error("TransformFromDomain::setPDF2D: -> Error");
     }
 }
 
@@ -681,7 +681,7 @@ void SetDecayFunction1D(SessionItem* item, const IFTDecayFunction1D* ipdf, QStri
         pdfItem->setItemValue(FTDecayFunction1DItem::P_DECAY_LENGTH, pdf->decayLength());
         pdfItem->setItemValue(FTDecayFunction1DVoigtItem::P_ETA, pdf->eEta());
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::SetDecayFunction1D: -> Error");
+        throw Error("TransformFromDomain::SetDecayFunction1D: -> Error");
     }
 }
 
@@ -707,7 +707,7 @@ void SetDecayFunction2D(SessionItem* item, const IFTDecayFunction2D* pdf, QStrin
         pdfItem->setItemValue(FTDecayFunction2DItem::P_GAMMA, Units::rad2deg(pdf_voigt->gamma()));
         pdfItem->setItemValue(FTDecayFunction2DVoigtItem::P_ETA, pdf_voigt->eta());
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::SetDecayFunction2D: -> Error");
+        throw Error("TransformFromDomain::SetDecayFunction2D: -> Error");
     }
 }
 
@@ -792,7 +792,7 @@ void setDistribution(BeamDistributionItem* part_distr_item, ParameterDistributio
         distr_trapez_item->setRightWidth(factor * distr->getRightWidth());
         distItem = distr_trapez_item;
     } else {
-        throw GUIHelpers::Error("TransformFromDomain::setDistribution: -> unknown distribution");
+        throw Error("TransformFromDomain::setDistribution: -> unknown distribution");
     }
 
     distItem->setNumberOfSamples(par_distr.getNbrSamples());
diff --git a/GUI/Models/TransformToDomain.cpp b/GUI/Models/TransformToDomain.cpp
index 383e887294c..1ed1e86e414 100644
--- a/GUI/Models/TransformToDomain.cpp
+++ b/GUI/Models/TransformToDomain.cpp
@@ -21,6 +21,7 @@
 #include "GUI/Models/BeamItems.h"
 #include "GUI/Models/BeamWavelengthItem.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FTDecayFunctionItems.h"
 #include "GUI/Models/FTDistributionItems.h"
 #include "GUI/Models/JobItem.h"
@@ -44,7 +45,6 @@
 #include "GUI/Models/TransformationItem.h"
 #include "GUI/Models/VectorItem.h"
 #include "GUI/Views/MaterialEditor/MaterialItemUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include "Sample/Aggregate/InterferenceFunctions.h"
 #include "Sample/Particle/MesoCrystal.h"
@@ -100,7 +100,7 @@ TransformToDomain::createLayerRoughness(const SessionItem& roughnessItem)
             roughnessItem.getItemValue(LayerBasicRoughnessItem::P_HURST).toDouble(),
             roughnessItem.getItemValue(LayerBasicRoughnessItem::P_LATERAL_CORR_LENGTH).toDouble());
     } else {
-        throw GUIHelpers::Error("TransformToDomain::createLayerRoughness() -> Error.");
+        throw Error("TransformToDomain::createLayerRoughness() -> Error.");
     }
 }
 
diff --git a/GUI/Views/CommonWidgets/DocksController.cpp b/GUI/Views/CommonWidgets/DocksController.cpp
index ed517b1e25a..4694491eef4 100644
--- a/GUI/Views/CommonWidgets/DocksController.cpp
+++ b/GUI/Views/CommonWidgets/DocksController.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/Views/CommonWidgets/DocksController.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 #include <QAbstractItemView>
 #include <QAction>
 #include <QDockWidget>
@@ -80,8 +80,8 @@ QDockWidget* DocksController::addDockForWidget(QWidget* widget)
 void DocksController::addWidget(int id, QWidget* widget, Qt::DockWidgetArea area)
 {
     if (m_docks.find(id) != m_docks.end())
-        throw GUIHelpers::Error("DocksController::addWidget() -> Error. "
-                                "Attempt to add widget id twice");
+        throw Error("DocksController::addWidget() -> Error. "
+                    "Attempt to add widget id twice");
 
     auto dock = addDockForWidget(widget);
     m_docks[id] = DockWidgetInfo(dock, widget, area);
@@ -132,7 +132,7 @@ QDockWidget* DocksController::findDock(QWidget* widget)
         if (it.second.widget() == widget)
             return it.second.dock();
 
-    throw GUIHelpers::Error("DocksController::findDock() -> Can't find dock for widget");
+    throw Error("DocksController::findDock() -> Can't find dock for widget");
 }
 
 const QList<QDockWidget*> DocksController::dockWidgets() const
diff --git a/GUI/Views/CommonWidgets/ItemStackWidget.cpp b/GUI/Views/CommonWidgets/ItemStackWidget.cpp
index 1da804ba6ee..41b99a637c2 100644
--- a/GUI/Views/CommonWidgets/ItemStackWidget.cpp
+++ b/GUI/Views/CommonWidgets/ItemStackWidget.cpp
@@ -13,8 +13,8 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/CommonWidgets/ItemStackWidget.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionModel.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QStackedWidget>
 #include <QVBoxLayout>
 
@@ -105,8 +105,8 @@ void ItemStackWidget::validateItem(SessionItem* item)
     if (m_model) {
         if (m_model != item->model())
             // in principle it should be possible, but should be tested
-            throw GUIHelpers::Error("ItemStackWidget::validateItem() -> Error. "
-                                    "Attempt to use items from different models.");
+            throw Error("ItemStackWidget::validateItem() -> Error. "
+                        "Attempt to use items from different models.");
     } else {
         setModel(item->model());
     }
diff --git a/GUI/Views/CommonWidgets/ModelTreeView.cpp b/GUI/Views/CommonWidgets/ModelTreeView.cpp
index 2f8e1b26a47..bb3a5b7db0d 100644
--- a/GUI/Views/CommonWidgets/ModelTreeView.cpp
+++ b/GUI/Views/CommonWidgets/ModelTreeView.cpp
@@ -13,9 +13,9 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/CommonWidgets/ModelTreeView.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionDecorationModel.h"
 #include "GUI/Models/SessionModel.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/StyleUtils.h"
 #include <QTreeView>
 #include <QVBoxLayout>
@@ -27,7 +27,7 @@ ModelTreeView::ModelTreeView(QWidget* parent, SessionModel* model)
     , m_is_expanded(false)
 {
     if (!model)
-        throw GUIHelpers::Error("ModelTreeView::ModelTreeView() -> Error. Nullptr as model.");
+        throw Error("ModelTreeView::ModelTreeView() -> Error. Nullptr as model.");
 
     setObjectName(model->getModelTag());
 
diff --git a/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp b/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
index a79b16d2f98..5de8f590cfd 100644
--- a/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
+++ b/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
@@ -20,6 +20,7 @@
 #include "Fit/Minimizer/IMinimizer.h"
 #include "GUI/Models/DataItem.h"
 #include "GUI/Models/DomainSimulationBuilder.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FitParameterItems.h"
 #include "GUI/Models/FitSuiteItem.h"
 #include "GUI/Models/JobItem.h"
@@ -115,7 +116,7 @@ std::unique_ptr<OutputData<double>> FitObjectiveBuilder::createOutputData() cons
 {
     auto realDataItem = m_jobItem->realDataItem();
     if (!realDataItem)
-        throw GUIHelpers::Error("FitObjectiveBuilder::createOutputData() -> No Real Data defined.");
+        throw Error("FitObjectiveBuilder::createOutputData() -> No Real Data defined.");
 
     const DataItem* intensity_item = realDataItem->dataItem();
     ASSERT(intensity_item);
diff --git a/GUI/Views/FitWidgets/FitSessionController.cpp b/GUI/Views/FitWidgets/FitSessionController.cpp
index 336fdb2f696..3cac1792bcc 100644
--- a/GUI/Views/FitWidgets/FitSessionController.cpp
+++ b/GUI/Views/FitWidgets/FitSessionController.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/FitWidgets/FitSessionController.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FitParameterItems.h"
 #include "GUI/Models/FitSuiteItem.h"
 #include "GUI/Models/IntensityDataItem.h"
@@ -51,7 +52,7 @@ FitSessionController::~FitSessionController() = default;
 void FitSessionController::setItem(JobItem* item)
 {
     if (m_jobItem && m_jobItem != item)
-        throw GUIHelpers::Error("FitSuiteManager::setItem() -> Item was already set.");
+        throw Error("FitSuiteManager::setItem() -> Item was already set.");
 
     m_jobItem = item;
     ASSERT(m_jobItem);
diff --git a/GUI/Views/FitWidgets/FitSessionManager.cpp b/GUI/Views/FitWidgets/FitSessionManager.cpp
index ef31def86be..90dd6f837c7 100644
--- a/GUI/Views/FitWidgets/FitSessionManager.cpp
+++ b/GUI/Views/FitWidgets/FitSessionManager.cpp
@@ -13,11 +13,11 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/FitWidgets/FitSessionManager.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItem.h"
 #include "GUI/Views/FitWidgets/FitLog.h"
 #include "GUI/Views/FitWidgets/FitSessionController.h"
 #include "GUI/Views/JobWidgets/JobMessagePanel.h"
-#include "GUI/utils/GUIHelpers.h"
 
 FitSessionManager::FitSessionManager(QObject* parent)
     : QObject(parent), m_activeController(nullptr), m_jobMessagePanel(nullptr)
@@ -73,8 +73,8 @@ void FitSessionManager::removeController(SessionItem* jobItem)
 {
     auto it = m_item_to_controller.find(jobItem);
     if (it == m_item_to_controller.end())
-        throw GUIHelpers::Error("FitActivityManager::removeFitSession() -> Error. "
-                                "Can't find fit session");
+        throw Error("FitActivityManager::removeFitSession() -> Error. "
+                    "Can't find fit session");
 
     if (m_activeController == it.value())
         m_activeController = nullptr;
diff --git a/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp b/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
index fb09d05d84a..05cfa1e3620 100644
--- a/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
+++ b/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
@@ -13,13 +13,13 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/ImportDataWidgets/RealDataPresenter.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/RealDataItem.h"
 #include "GUI/Views/ImportDataWidgets/RealDataMaskWidget.h"
 #include "GUI/Views/IntensityDataWidgets/IntensityDataProjectionsWidget.h"
 #include "GUI/Views/IntensityDataWidgets/IntensityDataWidget.h"
 #include "GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h"
 #include "GUI/Views/SpecularDataWidgets/SpecularDataWidget.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QAction>
 
 RealDataPresenter::RealDataPresenter(QWidget* parent) : ItemComboWidget(parent)
@@ -51,7 +51,7 @@ QStringList RealDataPresenter::activePresentationList(SessionItem* item)
             result << "Reflectometry (Configuration)";
         result << "Reflectometry (Graph only)";
     } else
-        throw GUIHelpers::Error(
+        throw Error(
             "Error in RealDataPresenter::activePresentationList: unsupported data type");
     return result;
 }
diff --git a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp b/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
index 86e78488c33..ad15106ae86 100644
--- a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
+++ b/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
@@ -16,6 +16,7 @@
 #include "Device/Data/DataUtils.h"
 #include "GUI/DataLoaders/DataLoaders1D.h"
 #include "GUI/DataLoaders/QREDataLoader.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/RealDataItem.h"
 #include "GUI/Models/RealDataModel.h"
 #include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
@@ -290,7 +291,7 @@ void RealDataSelectorWidget::importData2D()
 
         try {
             if (data->rank() != 2)
-                throw GUIHelpers::Error(
+                throw Error(
                     "The content could not be interpreted correctly as 2-dimensional.");
 
             realDataItem->setOutputData(data.release());
diff --git a/GUI/Views/InstrumentWidgets/DetectorPresenter.cpp b/GUI/Views/InstrumentWidgets/DetectorPresenter.cpp
index fb97feb892b..3e000943e5a 100644
--- a/GUI/Views/InstrumentWidgets/DetectorPresenter.cpp
+++ b/GUI/Views/InstrumentWidgets/DetectorPresenter.cpp
@@ -13,10 +13,10 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/InstrumentWidgets/DetectorPresenter.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItem.h"
 #include "GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h"
 #include "GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 const QString SphericalDetectorPresentation = "Spherical";
@@ -40,9 +40,9 @@ QString DetectorPresenter::itemPresentation() const
     else if (currentItem()->modelType() == "RectangularDetector")
         return RectangularDetectorPresentation;
     else
-        throw GUIHelpers::Error("DetectorPresenter::itemPresentation() -> Error. Wrong item "
-                                "type '"
-                                + currentItem()->modelType() + "'");
+        throw Error("DetectorPresenter::itemPresentation() -> Error. Wrong item "
+                    "type '"
+                    + currentItem()->modelType() + "'");
 }
 
 QStringList DetectorPresenter::activePresentationList(SessionItem* item)
diff --git a/GUI/Views/InstrumentWidgets/InstrumentPresenter.cpp b/GUI/Views/InstrumentWidgets/InstrumentPresenter.cpp
index 1a163b1d75b..97e841a6aaf 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentPresenter.cpp
+++ b/GUI/Views/InstrumentWidgets/InstrumentPresenter.cpp
@@ -13,13 +13,13 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/InstrumentWidgets/InstrumentPresenter.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/SessionItem.h"
 #include "GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h"
 #include "GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h"
 #include "GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h"
 #include "GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 const QString GISASPresentation = "GISAS";
@@ -54,9 +54,9 @@ QString InstrumentPresenter::itemPresentation() const
     if (currentItem()->is<DepthProbeInstrumentItem>())
         return DepthProbePresentation;
 
-    throw GUIHelpers::Error("InstrumentPresenter::itemPresentation() -> Error. Wrong item "
-                            "type '"
-                            + currentItem()->modelType() + "'");
+    throw Error("InstrumentPresenter::itemPresentation() -> Error. Wrong item "
+                "type '"
+                + currentItem()->modelType() + "'");
 }
 
 QStringList InstrumentPresenter::activePresentationList(SessionItem* item)
diff --git a/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp b/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
index d64ba835889..9f87668cb70 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
+++ b/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
@@ -13,9 +13,9 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/StyleUtils.h"
 
 using gradient_map_t = QMap<QString, QCPColorGradient::GradientPreset>;
@@ -67,8 +67,8 @@ QCPColorGradient ColorMapUtils::getGradient(const QString& gradientName)
 
     auto it = gradient_map.find(gradientName);
     if (it == gradient_map.end()) {
-        throw GUIHelpers::Error("ColorMapHelper::getGradient() -> Error. No such gradient"
-                                + gradientName);
+        throw Error("ColorMapHelper::getGradient() -> Error. No such gradient"
+                    + gradientName);
     }
     return QCPColorGradient(it.value());
 }
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp b/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
index 089be23c0c5..fcfd3b0648c 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
+++ b/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
@@ -14,9 +14,9 @@
 
 #include "GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h"
 #include "Device/Data/DataUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/SessionModel.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QAction>
 #include <QApplication>
 #include <QWidget>
@@ -44,7 +44,7 @@ void IntensityDataFFTPresenter::reset()
 IntensityDataItem* IntensityDataFFTPresenter::fftItem(IntensityDataItem* origItem)
 {
     if (!origItem)
-        throw GUIHelpers::Error("IntensityDataFFTPresenter::fftItem() -> Error. Empty item.");
+        throw Error("IntensityDataFFTPresenter::fftItem() -> Error. Empty item.");
 
     QApplication::setOverrideCursor(Qt::WaitCursor);
 
diff --git a/GUI/Views/IntensityDataWidgets/SaveProjectionsAssistant.cpp b/GUI/Views/IntensityDataWidgets/SaveProjectionsAssistant.cpp
index fb7da657592..25623a4ce0c 100644
--- a/GUI/Views/IntensityDataWidgets/SaveProjectionsAssistant.cpp
+++ b/GUI/Views/IntensityDataWidgets/SaveProjectionsAssistant.cpp
@@ -16,11 +16,11 @@
 #include "Base/Py/PyFmt.h"
 #include "Device/Histo/Histogram1D.h"
 #include "Device/Histo/Histogram2D.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/MaskItems.h"
 #include "GUI/Models/ProjectionItems.h"
 #include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QFileDialog>
 #include <QTextStream>
 
@@ -59,8 +59,8 @@ void SaveProjectionsAssistant::saveProjections(QWidget* parent, IntensityDataIte
 
     QFile file(fileName);
     if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
-        throw GUIHelpers::Error("TestProjectUtils::createTestFile() -> Error. "
-                                "Can't create file");
+        throw Error("TestProjectUtils::createTestFile() -> Error. "
+                    "Can't create file");
 
     m_hist2d = std::make_unique<Histogram2D>(*intensityItem->getOutputData());
 
diff --git a/GUI/Views/JobWidgets/JobViewActivities.cpp b/GUI/Views/JobWidgets/JobViewActivities.cpp
index 80408194389..9949108e728 100644
--- a/GUI/Views/JobWidgets/JobViewActivities.cpp
+++ b/GUI/Views/JobWidgets/JobViewActivities.cpp
@@ -13,8 +13,8 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/JobWidgets/JobViewActivities.h"
+#include "GUI/Models/Error.h"
 #include "GUI/mainwindow/mainwindow_constants.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 JobViewActivities::activity_map_t createActivityMap()
@@ -50,7 +50,7 @@ QVector<JobViewFlags::Dock> JobViewActivities::activeDocks(JobViewFlags::Activit
 {
     activity_map_t::iterator it = m_activityToDocks.find(activity);
     if (it == m_activityToDocks.end()) {
-        GUIHelpers::Error("JobViewActivities::activeDocks -> Error. Unknown activity");
+        Error("JobViewActivities::activeDocks -> Error. Unknown activity");
     }
     return m_activityToDocks[activity];
 }
diff --git a/GUI/Views/JobWidgets/ParameterTuningWidget.cpp b/GUI/Views/JobWidgets/ParameterTuningWidget.cpp
index b490e01a5b5..20649c97aa3 100644
--- a/GUI/Views/JobWidgets/ParameterTuningWidget.cpp
+++ b/GUI/Views/JobWidgets/ParameterTuningWidget.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/JobWidgets/ParameterTuningWidget.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/JobItem.h"
 #include "GUI/Models/JobModel.h"
@@ -22,7 +23,6 @@
 #include "GUI/Views/JobWidgets/JobRealTimeToolBar.h"
 #include "GUI/Views/JobWidgets/ParameterTuningDelegate.h"
 #include "GUI/Views/JobWidgets/SliderSettingsWidget.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QTreeView>
 #include <QVBoxLayout>
 
@@ -116,8 +116,8 @@ void ParameterTuningWidget::updateParameterModel()
         return;
 
     if (!jobItem()->multiLayerItem() || !jobItem()->instrumentItem())
-        throw GUIHelpers::Error("ModelTuningWidget::updateParameterModel() -> Error."
-                                "JobItem doesn't have sample or instrument model.");
+        throw Error("ModelTuningWidget::updateParameterModel() -> Error."
+                    "JobItem doesn't have sample or instrument model.");
 
     delete m_parameterTuningModel;
     m_parameterTuningModel = new ParameterTuningModel(this);
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp b/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
index 84a915cfbe2..e504dac4ed1 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
+++ b/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/MaskItems.h"
 #include "GUI/Models/SessionModel.h"
@@ -20,7 +21,6 @@
 #include "GUI/Views/MaskWidgets/MaskGraphicsProxy.h"
 #include "GUI/Views/MaskWidgets/MaskViewFactory.h"
 #include "GUI/Views/MaskWidgets/PolygonView.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QGraphicsItem>
 #include <QGraphicsSceneMoveEvent>
 #include <QItemSelection>
@@ -77,7 +77,7 @@ void MaskGraphicsScene::setMaskContext(SessionModel* model, const QModelIndex& m
 
         QString containerType = m_maskModel->itemForIndex(maskContainerIndex)->modelType();
         if (containerType != "MaskContainer" && containerType != "ProjectionContainer")
-            throw GUIHelpers::Error(
+            throw Error(
                 "MaskGraphicsScene::setMaskContext() -> Error. Not a container");
 
         m_maskContainerIndex = maskContainerIndex;
diff --git a/GUI/Views/MaskWidgets/MaskUnitsConverter.cpp b/GUI/Views/MaskWidgets/MaskUnitsConverter.cpp
index 9eeea6fb171..b7e1e979e43 100644
--- a/GUI/Views/MaskWidgets/MaskUnitsConverter.cpp
+++ b/GUI/Views/MaskWidgets/MaskUnitsConverter.cpp
@@ -14,10 +14,10 @@
 
 #include "GUI/Views/MaskWidgets/MaskUnitsConverter.h"
 #include "Device/Data/DataUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/IntensityDataItem.h"
 #include "GUI/Models/MaskItems.h"
 #include "GUI/Models/ProjectionItems.h"
-#include "GUI/utils/GUIHelpers.h"
 
 MaskUnitsConverter::MaskUnitsConverter() : m_data(nullptr), m_direction(UNDEFINED) {}
 
@@ -121,5 +121,5 @@ double MaskUnitsConverter::convert(double value, int axis_index)
     } else if (m_direction == FROM_NBINS) {
         return DataUtils::coordinateFromBinf(value, m_data->axis(axis_index));
     }
-    throw GUIHelpers::Error("MaskUnitsConverter::convertX() -> Error. Unknown conversion");
+    throw Error("MaskUnitsConverter::convertX() -> Error. Unknown conversion");
 }
diff --git a/GUI/Views/MaskWidgets/MaskViewFactory.cpp b/GUI/Views/MaskWidgets/MaskViewFactory.cpp
index efddf5c42ce..7eead06c3ab 100644
--- a/GUI/Views/MaskWidgets/MaskViewFactory.cpp
+++ b/GUI/Views/MaskWidgets/MaskViewFactory.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/MaskWidgets/MaskViewFactory.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItem.h"
 #include "GUI/Views/MaskWidgets/EllipseView.h"
 #include "GUI/Views/MaskWidgets/IntensityDataView.h"
@@ -22,7 +23,6 @@
 #include "GUI/Views/MaskWidgets/PolygonPointView.h"
 #include "GUI/Views/MaskWidgets/PolygonView.h"
 #include "GUI/Views/MaskWidgets/RegionOfInterestView.h"
-#include "GUI/utils/GUIHelpers.h"
 
 IShape2DView* MaskViewFactory::createMaskView(SessionItem* item, ISceneAdaptor* adaptor)
 {
@@ -70,9 +70,9 @@ IShape2DView* MaskViewFactory::createMaskView(SessionItem* item, ISceneAdaptor*
     }
 
     else {
-        throw GUIHelpers::Error("MaskViewFactory::createSampleView() -> Error! "
-                                "Can't create a view for "
-                                + model_type);
+        throw Error("MaskViewFactory::createSampleView() -> Error! "
+                    "Can't create a view for "
+                    + model_type);
     }
 
     result->setParameterizedItem(item);
diff --git a/GUI/Views/MaterialEditor/MaterialItemUtils.cpp b/GUI/Views/MaterialEditor/MaterialItemUtils.cpp
index 2a5f6eca2cb..872aa95cd4d 100644
--- a/GUI/Views/MaterialEditor/MaterialItemUtils.cpp
+++ b/GUI/Views/MaterialEditor/MaterialItemUtils.cpp
@@ -14,6 +14,7 @@
 
 #include "GUI/Views/MaterialEditor/MaterialItemUtils.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/LayerItem.h"
 #include "GUI/Models/MaterialDataItems.h"
 #include "GUI/Models/MaterialItemContainer.h"
@@ -27,7 +28,6 @@
 #include "GUI/Views/SampleDesigner/DesignerHelper.h"
 #include "GUI/mainwindow/AppSvc.h"
 #include "GUI/mainwindow/mainwindow.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Sample/Material/Material.h"
 #include <QColorDialog>
 
@@ -81,24 +81,24 @@ MaterialItemUtils::createDomainMaterial(const ExternalProperty& material_propert
 {
     const MaterialItem* material_item = container.findMaterialById(material_property.identifier());
     if (!material_item)
-        throw GUIHelpers::Error("MaterialUtils::createDomainMaterial() -> Error. Can't find "
-                                "material with name '"
-                                + material_property.text() + "'.");
+        throw Error("MaterialUtils::createDomainMaterial() -> Error. Can't find "
+                    "material with name '"
+                    + material_property.text() + "'.");
     return material_item->createMaterial();
 }
 
 MaterialItem* MaterialItemUtils::findMaterial(const ExternalProperty& material_property)
 {
     if (!AppSvc::materialModel())
-        throw GUIHelpers::Error("MaterialItemUtils::findMaterial() -> Error. "
-                                "Attempt to access non-existing material model");
+        throw Error("MaterialItemUtils::findMaterial() -> Error. "
+                    "Attempt to access non-existing material model");
 
     auto material = AppSvc::materialModel()->materialFromIdentifier(material_property.identifier());
 
     if (!material)
-        throw GUIHelpers::Error("MaterialUtils::findMaterial() -> Error. Can't find "
-                                "material with name '"
-                                + material_property.text() + "'.");
+        throw Error("MaterialUtils::findMaterial() -> Error. Can't find "
+                    "material with name '"
+                    + material_property.text() + "'.");
     return material;
 }
 
@@ -201,7 +201,7 @@ QVector<SessionItem*> MaterialItemUtils::materialPropertyItems(SessionItem* item
         else if (model_type == "ParticleCoreShell")
             materials.append(static_cast<ParticleCoreShellItem*>(item)->materialPropertyItems());
         else
-            throw GUIHelpers::Error(
+            throw Error(
                 "Error in MaterialItemUtils::materialProperties: cannot handle passed model type '"
                 + model_type + "'");
     }
diff --git a/GUI/Views/PropertyEditor/CustomEditors.cpp b/GUI/Views/PropertyEditor/CustomEditors.cpp
index 2e69b0e8e7a..90b6b8812a8 100644
--- a/GUI/Views/PropertyEditor/CustomEditors.cpp
+++ b/GUI/Views/PropertyEditor/CustomEditors.cpp
@@ -14,11 +14,11 @@
 
 #include "GUI/Views/PropertyEditor/CustomEditors.h"
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/GroupItemController.h"
 #include "GUI/Views/JobWidgets/ScientificSpinBox.h"
 #include "GUI/Views/MaterialEditor/MaterialItemUtils.h"
 #include "GUI/utils/CustomEventFilters.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QApplication>
 #include <QBoxLayout>
 #include <QCheckBox>
@@ -114,7 +114,7 @@ void ExternalPropertyEditor::buttonClicked()
     } else if (m_extDialogType == "ExtColorEditor") {
         newProperty = MaterialItemUtils::selectColorProperty(property);
     } else {
-        throw GUIHelpers::Error("ExternalPropertyEditor::buttonClicked() -> Unexpected dialog");
+        throw Error("ExternalPropertyEditor::buttonClicked() -> Unexpected dialog");
     }
 
     removeEventFilter(m_focusFilter);
diff --git a/GUI/Views/SampleDesigner/ConnectableView.cpp b/GUI/Views/SampleDesigner/ConnectableView.cpp
index 0b1fe135edf..fae2fe98c5d 100644
--- a/GUI/Views/SampleDesigner/ConnectableView.cpp
+++ b/GUI/Views/SampleDesigner/ConnectableView.cpp
@@ -13,10 +13,10 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItem.h"
 #include "GUI/Views/SampleDesigner/DesignerHelper.h"
 #include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/StyleUtils.h"
 #include <QObject>
 #include <QPainter>
@@ -75,7 +75,7 @@ NodeEditorPort* ConnectableView::addPort(const QString& name,
     } else if (direction == NodeEditorPort::OUTPUT) {
         m_output_ports.append(port);
     } else {
-        throw GUIHelpers::Error("ConnectableView::addPort() -> Unknown port type");
+        throw Error("ConnectableView::addPort() -> Unknown port type");
     }
     setPortCoordinates();
     return port;
@@ -92,10 +92,10 @@ void ConnectableView::connectInputPort(ConnectableView* other, int port_number)
     ASSERT(other);
 
     if (port_number >= m_input_ports.size())
-        throw GUIHelpers::Error("ConnectableView::connectInputPort() -> Wrong input port number");
+        throw Error("ConnectableView::connectInputPort() -> Wrong input port number");
 
     if (other->getOutputPorts().size() != 1)
-        throw GUIHelpers::Error("ConnectableView::connectInputPort() -> Wrong output port number");
+        throw Error("ConnectableView::connectInputPort() -> Wrong output port number");
 
     if (port_number < 0)
         return;
diff --git a/GUI/Views/SampleDesigner/DesignerView.cpp b/GUI/Views/SampleDesigner/DesignerView.cpp
index 60ec1b3f47b..8509de23bd8 100644
--- a/GUI/Views/SampleDesigner/DesignerView.cpp
+++ b/GUI/Views/SampleDesigner/DesignerView.cpp
@@ -14,9 +14,9 @@
 
 #include "GUI/Views/SampleDesigner/DesignerView.h"
 #include "Base/Utils/Assert.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Views/SampleDesigner/DesignerMimeData.h"
 #include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QDragEnterEvent>
 #include <QGraphicsScene>
 #include <QGraphicsView>
@@ -41,7 +41,7 @@ int DesignerView::getSelectionMode() const
     } else if (dragMode() == QGraphicsView::ScrollHandDrag) {
         return HAND_DRAG;
     } else {
-        throw GUIHelpers::Error("DesignerView::getSelectionMode() -> Error.");
+        throw Error("DesignerView::getSelectionMode() -> Error.");
     }
 }
 
diff --git a/GUI/Views/SampleDesigner/ILayerView.cpp b/GUI/Views/SampleDesigner/ILayerView.cpp
index 6b9c1aa792f..b1ca4d7ec32 100644
--- a/GUI/Views/SampleDesigner/ILayerView.cpp
+++ b/GUI/Views/SampleDesigner/ILayerView.cpp
@@ -13,12 +13,12 @@
 //  ************************************************************************************************
 
 #include "GUI/Models/ExternalProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/LayerItem.h"
 #include "GUI/Models/SampleModel.h"
 #include "GUI/Views/SampleDesigner/DesignerHelper.h"
 #include "GUI/Views/SampleDesigner/DesignerScene.h"
 #include "GUI/Views/SampleDesigner/MultiLayerView.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QGraphicsSceneMouseEvent>
 
 QLineF MultiLayerCandidate::getInterfaceToScene()
@@ -202,7 +202,7 @@ void ILayerView::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
     }
 
     // throw only happens when not all cases were considered previously
-    throw GUIHelpers::Error("LayerView::mouseReleaseEvent() -> Loggic error.");
+    throw Error("LayerView::mouseReleaseEvent() -> Loggic error.");
 }
 
 void ILayerView::update_appearance()
diff --git a/GUI/Views/SampleDesigner/ParticleLayoutView.cpp b/GUI/Views/SampleDesigner/ParticleLayoutView.cpp
index 8194b6f4a3d..9bae6b1d6d1 100644
--- a/GUI/Views/SampleDesigner/ParticleLayoutView.cpp
+++ b/GUI/Views/SampleDesigner/ParticleLayoutView.cpp
@@ -13,10 +13,10 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/SampleDesigner/ParticleLayoutView.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItem.h"
 #include "GUI/Views/SampleDesigner/DesignerHelper.h"
 #include "GUI/Views/SampleDesigner/ParticleView.h"
-#include "GUI/utils/GUIHelpers.h"
 
 ParticleLayoutView::ParticleLayoutView(QGraphicsItem* parent) : ConnectableView(parent)
 {
@@ -45,6 +45,6 @@ void ParticleLayoutView::addView(IView* childView, int /* row */)
                || childView->type() == ViewTypes::INTERFERENCE_FUNCTION_RADIAL_PARA) {
         connectInputPort(dynamic_cast<ConnectableView*>(childView), 1);
     } else {
-        throw GUIHelpers::Error("ParticleLayoutView::addView() -> Error. Unknown view");
+        throw Error("ParticleLayoutView::addView() -> Error. Unknown view");
     }
 }
diff --git a/GUI/Views/SampleDesigner/ParticleView.cpp b/GUI/Views/SampleDesigner/ParticleView.cpp
index c3ca0514225..7696d27bcaf 100644
--- a/GUI/Views/SampleDesigner/ParticleView.cpp
+++ b/GUI/Views/SampleDesigner/ParticleView.cpp
@@ -13,11 +13,11 @@
 //  ************************************************************************************************
 
 #include "GUI/Views/SampleDesigner/ParticleView.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/FormFactorItems.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/ParticleItem.h"
 #include "GUI/Views/SampleDesigner/DesignerHelper.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/StyleUtils.h"
 #include <QObject>
 #include <QPainter>
@@ -81,7 +81,7 @@ void ParticleView::addView(IView* childView, int /*row*/)
     if (childView->type() == ViewTypes::TRANSFORMATION) {
         connectInputPort(dynamic_cast<ConnectableView*>(childView), 0);
     } else {
-        throw GUIHelpers::Error("ParticleView::addView() -> Error. Unknown view");
+        throw Error("ParticleView::addView() -> Error. Unknown view");
     }
 }
 
diff --git a/GUI/mainwindow/AppSvc.cpp b/GUI/mainwindow/AppSvc.cpp
index 85966cf2b98..ddd12bf070c 100644
--- a/GUI/mainwindow/AppSvc.cpp
+++ b/GUI/mainwindow/AppSvc.cpp
@@ -13,7 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/mainwindow/AppSvc.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 
 ProjectManager* AppSvc::projectManager()
 {
@@ -50,8 +50,8 @@ AppSvc::AppSvc() : m_projectManager(nullptr), m_materialModel(nullptr) {}
 ProjectManager* AppSvc::this_projectManager()
 {
     if (!m_projectManager)
-        throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to access "
-                                "non existing ProjectManager.");
+        throw Error("AppSvc::projectManager() -> Error. Attempt to access "
+                    "non existing ProjectManager.");
 
     return m_projectManager;
 }
@@ -64,8 +64,8 @@ MaterialModel* AppSvc::this_materialModel()
 void AppSvc::this_subscribe(ProjectManager* projectManager)
 {
     if (m_projectManager != nullptr)
-        throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to subscribe "
-                                "ProjectManager twice.");
+        throw Error("AppSvc::projectManager() -> Error. Attempt to subscribe "
+                    "ProjectManager twice.");
 
     m_projectManager = projectManager;
 }
@@ -73,8 +73,8 @@ void AppSvc::this_subscribe(ProjectManager* projectManager)
 void AppSvc::this_unsubscribe(ProjectManager* projectManager)
 {
     if (m_projectManager != projectManager)
-        throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to unsubscribe "
-                                "ProjectManager before it was subscribed.");
+        throw Error("AppSvc::projectManager() -> Error. Attempt to unsubscribe "
+                    "ProjectManager before it was subscribed.");
 
     m_projectManager = nullptr;
 }
@@ -82,8 +82,8 @@ void AppSvc::this_unsubscribe(ProjectManager* projectManager)
 void AppSvc::this_subscribe(MaterialModel* materialModel)
 {
     if (m_materialModel)
-        throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to subscribe "
-                                "MaterialModel twice.");
+        throw Error("AppSvc::projectManager() -> Error. Attempt to subscribe "
+                    "MaterialModel twice.");
 
     m_materialModel = materialModel;
 }
@@ -91,8 +91,8 @@ void AppSvc::this_subscribe(MaterialModel* materialModel)
 void AppSvc::this_unsubscribe(MaterialModel* materialModel)
 {
     if (m_materialModel != materialModel)
-        throw GUIHelpers::Error("AppSvc::projectManager() -> Error. Attempt to unsubscribe "
-                                "MaterialModel before it was subscribed.");
+        throw Error("AppSvc::projectManager() -> Error. Attempt to unsubscribe "
+                    "MaterialModel before it was subscribed.");
 
     m_materialModel = nullptr;
 }
diff --git a/GUI/mainwindow/OutputDataIOHistory.cpp b/GUI/mainwindow/OutputDataIOHistory.cpp
index 432920a540f..bd9044f4e53 100644
--- a/GUI/mainwindow/OutputDataIOHistory.cpp
+++ b/GUI/mainwindow/OutputDataIOHistory.cpp
@@ -14,8 +14,8 @@
 
 #include "GUI/mainwindow/OutputDataIOHistory.h"
 #include "Base/Utils/Assert.h"
+#include "GUI/Models/Error.h"
 #include "GUI/mainwindow/SaveLoadInterface.h"
-#include "GUI/utils/GUIHelpers.h"
 
 //! Static method to create info for just saved item.
 
@@ -48,8 +48,8 @@ bool OutputDataSaveInfo::wasSavedBefore(const QDateTime& dtime) const
 void OutputDataDirHistory::markAsSaved(const SaveLoadInterface* item)
 {
     if (contains(item))
-        throw GUIHelpers::Error("OutputDataDirHistory::markAsSaved() -> Error. "
-                                "Already existing item.");
+        throw Error("OutputDataDirHistory::markAsSaved() -> Error. "
+                    "Already existing item.");
     // Don't create any history info for empty items
     if (item->containsNonXMLData())
         m_history.push_back(OutputDataSaveInfo::createSaved(item));
@@ -89,7 +89,7 @@ OutputDataSaveInfo OutputDataDirHistory::itemInfo(const SaveLoadInterface* item)
             return info;
     }
 
-    throw GUIHelpers::Error("OutputDataDirHistory::itemInfo() -> Error. No info exists.");
+    throw Error("OutputDataDirHistory::itemInfo() -> Error. No info exists.");
 }
 
 //-----------------------------------------------------------------------------
@@ -103,9 +103,8 @@ bool OutputDataIOHistory::wasModifiedSinceLastSave(const QString& dirname,
                                                    const SaveLoadInterface* item)
 {
     if (!hasHistory(dirname))
-        throw GUIHelpers::Error("OutputDataIOHistory::wasModifiedSinceLastSave() -> Error. "
-                                "No info for directory '"
-                                + dirname + "'.");
+        throw Error("OutputDataIOHistory::wasModifiedSinceLastSave() -> Error. "
+                    "No info for directory '" + dirname + "'.");
     return m_dir_history[dirname].wasModifiedSinceLastSave(item);
 }
 
@@ -121,9 +120,8 @@ void OutputDataIOHistory::setHistory(const QString& dirname, const OutputDataDir
 QStringList OutputDataIOHistory::savedFileNames(const QString& dirname) const
 {
     if (!hasHistory(dirname))
-        throw GUIHelpers::Error("OutputDataIOHistory::savedFileNames() -> Error. "
-                                "No info for directory '"
-                                + dirname + "'.");
+        throw Error("OutputDataIOHistory::savedFileNames() -> Error. "
+                    "No info for directory '" + dirname + "'.");
 
     return m_dir_history[dirname].savedFileNames();
 }
diff --git a/GUI/mainwindow/ProjectUtils.cpp b/GUI/mainwindow/ProjectUtils.cpp
index 11fa76dd037..b857b17647e 100644
--- a/GUI/mainwindow/ProjectUtils.cpp
+++ b/GUI/mainwindow/ProjectUtils.cpp
@@ -13,11 +13,11 @@
 //  ************************************************************************************************
 
 #include "GUI/mainwindow/ProjectUtils.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/ItemFileNameUtils.h"
 #include "GUI/mainwindow/AppSvc.h"
 #include "GUI/mainwindow/projectdocument.h"
 #include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QDateTime>
 #include <QDebug>
 #include <QDir>
@@ -77,9 +77,9 @@ QStringList ProjectUtils::nonXMLDataInDir(const QString& dirname)
     QDir dir(dirname);
 
     if (!dir.exists())
-        throw GUIHelpers::Error("ProjectUtils::nonXMLDataInDir() -> Error. Non existing "
-                                "directory '"
-                                + dirname + "'.");
+        throw Error("ProjectUtils::nonXMLDataInDir() -> Error. Non existing "
+                    "directory '" 
+                    + dirname + "'.");
 
     return dir.entryList(ItemFileNameUtils::nonXMLFileNameFilters());
 }
@@ -89,9 +89,9 @@ bool ProjectUtils::removeRecursively(const QString& dirname)
     QDir dir(dirname);
 
     if (!dir.exists())
-        throw GUIHelpers::Error("ProjectUtils::removeRecursively() -> Error. Non existing "
-                                "directory '"
-                                + dirname + "'.");
+        throw Error("ProjectUtils::removeRecursively() -> Error. Non existing "
+                    "directory '"
+                    + dirname + "'.");
 
     return dir.removeRecursively();
 }
@@ -102,9 +102,9 @@ bool ProjectUtils::removeFile(const QString& dirname, const QString& filename)
     QFile fin(name);
 
     if (!fin.exists())
-        throw GUIHelpers::Error("ProjectUtils::removeFile() -> Error. Non existing "
-                                "file '"
-                                + name + "'.");
+        throw Error("ProjectUtils::removeFile() -> Error. Non existing "
+                    "file '"
+                    + name + "'.");
 
     return fin.remove();
 }
@@ -136,8 +136,8 @@ QString ProjectUtils::readTextFile(const QString& fileName)
 {
     QFile file(fileName);
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
-        throw GUIHelpers::Error("ProjectUtils::readTextFile -> Error. Can't open the file '"
-                                + fileName + "' for reading.");
+        throw Error("ProjectUtils::readTextFile -> Error. Can't open the file '"
+                    + fileName + "' for reading.");
     QTextStream in(&file);
     return in.readAll();
 }
diff --git a/GUI/mainwindow/SaveService.cpp b/GUI/mainwindow/SaveService.cpp
index 2f260d487db..0b8030327dd 100644
--- a/GUI/mainwindow/SaveService.cpp
+++ b/GUI/mainwindow/SaveService.cpp
@@ -14,12 +14,12 @@
 
 #include "GUI/mainwindow/SaveService.h"
 #include "Base/Utils/Assert.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Views/CommonWidgets/UpdateTimer.h"
 #include "GUI/mainwindow/AutosaveController.h"
 #include "GUI/mainwindow/ProjectUtils.h"
 #include "GUI/mainwindow/SaveThread.h"
 #include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QApplication>
 #include <QCoreApplication>
 #include <QTime>
@@ -107,7 +107,7 @@ void SaveService::stopService()
                 break;
         }
         if (isSaving())
-            throw GUIHelpers::Error("SaveService::stopService() -> Error. Can't stop service. ");
+            throw Error("SaveService::stopService() -> Error. Can't stop service. ");
     }
 
     if (m_autosave)
diff --git a/GUI/mainwindow/projectdocument.cpp b/GUI/mainwindow/projectdocument.cpp
index 06f3bf79c19..41767d443e7 100644
--- a/GUI/mainwindow/projectdocument.cpp
+++ b/GUI/mainwindow/projectdocument.cpp
@@ -14,6 +14,7 @@
 
 #include "GUI/mainwindow/projectdocument.h"
 #include "GUI/Models/ApplicationModels.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobModel.h"
 #include "GUI/mainwindow/OutputDataIOService.h"
 #include "GUI/mainwindow/ProjectUtils.h"
@@ -104,9 +105,9 @@ void ProjectDocument::saveProjectFile(const QString& project_file_name, bool aut
 
     QFile file(project_file_name);
     if (!file.open(QFile::ReadWrite | QIODevice::Truncate | QFile::Text))
-        throw GUIHelpers::Error("ProjectDocument::save_project_file() -> Error. Can't open "
-                                "file '"
-                                + project_file_name + "' for writing.");
+        throw Error("ProjectDocument::save_project_file() -> Error. Can't open "
+                    "file '"
+                    + project_file_name + "' for writing.");
 
     writeTo(&file);
     file.close();
diff --git a/GUI/mainwindow/projectmanager.cpp b/GUI/mainwindow/projectmanager.cpp
index 51a5eed8f45..adb406f4b53 100644
--- a/GUI/mainwindow/projectmanager.cpp
+++ b/GUI/mainwindow/projectmanager.cpp
@@ -15,6 +15,7 @@
 #include "GUI/mainwindow/projectmanager.h"
 #include "Base/Utils/Assert.h"
 #include "GUI/Models/ApplicationModels.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Views/InfoWidgets/ProjectLoadWarningDialog.h"
 #include "GUI/mainwindow/AppSvc.h"
 #include "GUI/mainwindow/ProjectUtils.h"
@@ -349,7 +350,7 @@ void ProjectManager::openProject(QString fileName)
 void ProjectManager::createNewProject()
 {
     if (m_project_document)
-        throw GUIHelpers::Error("ProjectManager::createNewProject() -> Project already exists");
+        throw Error("ProjectManager::createNewProject() -> Project already exists");
 
     m_messageService->clear();
 
diff --git a/GUI/mainwindow/tooltipdatabase.cpp b/GUI/mainwindow/tooltipdatabase.cpp
index 10251d8c0a4..9f594cf8aee 100644
--- a/GUI/mainwindow/tooltipdatabase.cpp
+++ b/GUI/mainwindow/tooltipdatabase.cpp
@@ -14,7 +14,7 @@
 
 #include "GUI/mainwindow/tooltipdatabase.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 #include <QFile>
 #include <QXmlStreamReader>
 
@@ -59,7 +59,7 @@ void ToolTipDataBase::initDataBase()
 {
     QFile file(":/mainwindow/tooltips.xml");
     if (!file.open(QIODevice::ReadOnly))
-        throw GUIHelpers::Error(file.errorString());
+        throw Error(file.errorString());
 
     QXmlStreamReader reader(&file);
 
@@ -103,7 +103,7 @@ void ToolTipDataBase::initDataBase()
     }
 
     if (reader.hasError())
-        throw GUIHelpers::Error(reader.errorString());
+        throw Error(reader.errorString());
 }
 
 QString ToolTipDataBase::getTag(const QString& contextName, const QString& categoryName,
diff --git a/GUI/utils/GUIHelpers.cpp b/GUI/utils/GUIHelpers.cpp
index 7ead01b61fe..b2448b0f31a 100644
--- a/GUI/utils/GUIHelpers.cpp
+++ b/GUI/utils/GUIHelpers.cpp
@@ -13,6 +13,7 @@
 //  ************************************************************************************************
 
 #include "GUI/utils/GUIHelpers.h"
+#include "GUI/Models/Error.h"
 #include "BAVersion.h"
 #include <QApplication>
 #include <QDateTime>
@@ -41,13 +42,6 @@ const QMap<QString, QString> invalidCharacterMap = initializeCharacterMap();
 
 namespace GUIHelpers {
 
-Error::~Error() noexcept = default;
-
-const char* Error::what() const noexcept
-{
-    return m_messageAsLatin1.data();
-}
-
 void information(QWidget* parent, const QString& title, const QString& text,
                  const QString& detailedText)
 {
@@ -235,8 +229,8 @@ QString readTextFile(const QString& fileName)
 {
     QFile file(fileName);
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
-        throw GUIHelpers::Error("PyImportAssistant::readFile() -> Error. Can't read file '"
-                                + fileName + "'");
+        throw Error("PyImportAssistant::readFile() -> Error. Can't read file '"
+                    + fileName + "'");
     QTextStream in(&file);
     return in.readAll();
 }
diff --git a/GUI/utils/GUIHelpers.h b/GUI/utils/GUIHelpers.h
index 27f322b315d..9b1f7829caa 100644
--- a/GUI/utils/GUIHelpers.h
+++ b/GUI/utils/GUIHelpers.h
@@ -24,21 +24,6 @@ class JobItem;
 class RealDataItem;
 
 namespace GUIHelpers {
-class Error : public std::exception {
-public:
-    explicit Error(const QString& message) noexcept : m_messageAsLatin1(message.toLatin1()) {}
-    virtual ~Error() noexcept;
-
-    Error(const Error&) = default;
-    Error& operator=(const Error&) = default;
-    Error(Error&&) = default;
-    Error& operator=(Error&&) = default;
-
-    const char* what() const noexcept override;
-
-private:
-    QByteArray m_messageAsLatin1;
-};
 
 void information(QWidget* parent, const QString& title, const QString& text,
                  const QString& detailedText = "");
diff --git a/GUI/utils/ImportDataInfo.cpp b/GUI/utils/ImportDataInfo.cpp
index e16e5ae5358..5a4f6dc449c 100644
--- a/GUI/utils/ImportDataInfo.cpp
+++ b/GUI/utils/ImportDataInfo.cpp
@@ -14,9 +14,9 @@
 
 #include "Device/Coord/AxisNames.h"
 #include "Device/Data/OutputData.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobItemUtils.h"
 #include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 
 namespace {
 std::vector<Axes::Coords> specularUnits()
@@ -101,7 +101,7 @@ QString ImportDataInfo::axisLabel(size_t axis_index) const
             return "Signal [a.u.]";
         return QString::fromStdString(AxisNames::specAxis.at(m_coords));
     }
-    throw GUIHelpers::Error("Error in ImportDataInfo::axisLabel: unsupported data type");
+    throw Error("Error in ImportDataInfo::axisLabel: unsupported data type");
 }
 
 void ImportDataInfo::checkValidity()
@@ -110,10 +110,10 @@ void ImportDataInfo::checkValidity()
         return;
     auto iter = available_units.find(m_data->rank());
     if (iter == available_units.end())
-        throw GUIHelpers::Error("Error in ImportDataInfo constructor: unsupported data type");
+        throw Error("Error in ImportDataInfo constructor: unsupported data type");
     for (auto& value : iter->second)
         if (m_coords == value)
             return;
 
-    throw GUIHelpers::Error("Error in ImportDataInfo constructor: inacceptable units passed.");
+    throw Error("Error in ImportDataInfo constructor: inacceptable units passed.");
 }
diff --git a/Tests/UnitTests/GUI/TestAxesItems.cpp b/Tests/UnitTests/GUI/TestAxesItems.cpp
index f35124a909d..bf4e156f651 100644
--- a/Tests/UnitTests/GUI/TestAxesItems.cpp
+++ b/Tests/UnitTests/GUI/TestAxesItems.cpp
@@ -2,9 +2,9 @@
 #include "Base/Axis/VariableBinAxis.h"
 #include "Base/Const/Units.h"
 #include "GUI/Models/AxesItems.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/PropertyItem.h"
 #include "GUI/Models/TransformFromDomain.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestAxesItems : public ::testing::Test {
@@ -61,5 +61,5 @@ TEST_F(TestAxesItems, transformFromDomain)
     // transform from unexpected axis
     std::vector<double> bins = {1.0, 2.0, 3.0};
     VariableBinAxis varaxis("axis", bins.size() - 1, bins);
-    EXPECT_THROW(TransformFromDomain::setAxisItem(&item, varaxis), GUIHelpers::Error);
+    EXPECT_THROW(TransformFromDomain::setAxisItem(&item, varaxis), Error);
 }
diff --git a/Tests/UnitTests/GUI/TestDataItemViews.cpp b/Tests/UnitTests/GUI/TestDataItemViews.cpp
index 4dd42d6a0b1..31cadc08da7 100644
--- a/Tests/UnitTests/GUI/TestDataItemViews.cpp
+++ b/Tests/UnitTests/GUI/TestDataItemViews.cpp
@@ -3,10 +3,10 @@
 #include "GUI/Models/DataItem.h"
 #include "GUI/Models/DataProperties.h"
 #include "GUI/Models/DataPropertyContainer.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/RealDataModel.h"
 #include "GUI/Models/SpecularDataItem.h"
 #include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "GUI/utils/MessageService.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/UnitTests/GUI/Utils.h"
@@ -103,7 +103,7 @@ TEST_F(TestDataItemViews, testBrokenLink)
 
     DataItem* item2 = insertNewDataItem(model, 1.0);
     view_item->addItem(item2);
-    EXPECT_THROW(view_item->propertyItem(0)->dataItem(), GUIHelpers::Error);
+    EXPECT_THROW(view_item->propertyItem(0)->dataItem(), Error);
 }
 
 TEST_F(TestDataItemViews, testWrongHostingModel)
@@ -115,7 +115,7 @@ TEST_F(TestDataItemViews, testWrongHostingModel)
 
     SessionModel model2("TempModel2");
     DataItem* item2 = insertNewDataItem(model2, 1.0);
-    EXPECT_THROW(view_item->addItem(item2), GUIHelpers::Error);
+    EXPECT_THROW(view_item->addItem(item2), Error);
 
     auto stored_items = view_item->propertyItems();
     EXPECT_EQ(stored_items.size(), 1);
diff --git a/Tests/UnitTests/GUI/TestGroupItem.cpp b/Tests/UnitTests/GUI/TestGroupItem.cpp
index c12bcebcf76..33a00ffe492 100644
--- a/Tests/UnitTests/GUI/TestGroupItem.cpp
+++ b/Tests/UnitTests/GUI/TestGroupItem.cpp
@@ -1,8 +1,8 @@
 #include "GUI/Models/ComboProperty.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/SessionItemUtils.h"
 #include "GUI/Models/SessionModel.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/UnitTests/GUI/Utils.h"
 
@@ -42,10 +42,10 @@ TEST_F(TestGroupItem, test_groupInfo)
                                                << "c_label2");
 
     // attempt to set non-existing default type
-    EXPECT_THROW(info.setDefaultType("XXX"), GUIHelpers::Error);
+    EXPECT_THROW(info.setDefaultType("XXX"), Error);
 
     // attempt to add same info twice
-    EXPECT_THROW(info.add("CCC2", "c_label2"), GUIHelpers::Error);
+    EXPECT_THROW(info.add("CCC2", "c_label2"), Error);
 }
 
 TEST_F(TestGroupItem, test_CreateGroup)
@@ -64,7 +64,7 @@ TEST_F(TestGroupItem, test_CreateGroup)
     groupItem->setGroupInfo(groupInfo);
 
     // setting group info twice
-    EXPECT_THROW(groupItem->setGroupInfo(groupInfo), GUIHelpers::Error);
+    EXPECT_THROW(groupItem->setGroupInfo(groupInfo), Error);
 
     // checking current item
     EXPECT_EQ(groupItem->children().size(), 1);
diff --git a/Tests/UnitTests/GUI/TestOutputDataIOService.cpp b/Tests/UnitTests/GUI/TestOutputDataIOService.cpp
index a495b169dba..ed23685ce3c 100644
--- a/Tests/UnitTests/GUI/TestOutputDataIOService.cpp
+++ b/Tests/UnitTests/GUI/TestOutputDataIOService.cpp
@@ -5,6 +5,7 @@
 #include "GUI/Models/JobItem.h"
 #include "GUI/Models/JobItemUtils.h"
 #include "GUI/Models/JobModel.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/JobModelFunctions.h"
 #include "GUI/Models/RealDataItem.h"
 #include "GUI/Models/RealDataModel.h"
@@ -79,7 +80,7 @@ TEST_F(TestOutputDataIOService, test_nonXMLData)
     // Replacing the data inside RealDataItem with the data of different dimensions
     auto data = GuiUnittestUtils::createData(3.0, GuiUnittestUtils::DIM::D1);
     EXPECT_THROW(dynamic_cast<RealDataItem*>(realData)->setOutputData(data.get()),
-                 GUIHelpers::Error);
+                 Error);
     EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1);
 }
 
@@ -131,7 +132,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory)
     EXPECT_FALSE(history.wasModifiedSinceLastSave(item1));
 
     // Attempt to save same item second time
-    EXPECT_THROW(history.markAsSaved(item1), GUIHelpers::Error);
+    EXPECT_THROW(history.markAsSaved(item1), Error);
 
     // Modifying item
     QTest::qSleep(10);
@@ -178,7 +179,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOHistory)
                 == true); // since item2 doesn't exist
 
     // asking info for some non-existing directory
-    EXPECT_THROW(history.wasModifiedSinceLastSave("dir3", item1), GUIHelpers::Error);
+    EXPECT_THROW(history.wasModifiedSinceLastSave("dir3", item1), Error);
 }
 
 //! Testing saving abilities of OutputDataIOService class.
diff --git a/Tests/UnitTests/GUI/TestProjectUtils.cpp b/Tests/UnitTests/GUI/TestProjectUtils.cpp
index 51cdf3f5b26..85eddc40ce9 100644
--- a/Tests/UnitTests/GUI/TestProjectUtils.cpp
+++ b/Tests/UnitTests/GUI/TestProjectUtils.cpp
@@ -1,5 +1,5 @@
+#include "GUI/Models/Error.h"
 #include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Utils.h"
 #include <QDir>
@@ -16,8 +16,8 @@ protected:
 
         QFile file(filename);
         if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
-            throw GUIHelpers::Error("TestProjectUtils::createTestFile() -> Error. "
-                                    "Can't create file");
+            throw Error("TestProjectUtils::createTestFile() -> Error. "
+                        "Can't create file");
 
         QTextStream out(&file);
         out << "Test file " << 42 << "\n";
diff --git a/Tests/UnitTests/GUI/TestSaveService.cpp b/Tests/UnitTests/GUI/TestSaveService.cpp
index 0849e06da71..2853462fa42 100644
--- a/Tests/UnitTests/GUI/TestSaveService.cpp
+++ b/Tests/UnitTests/GUI/TestSaveService.cpp
@@ -1,4 +1,5 @@
 #include "GUI/Models/ApplicationModels.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/InstrumentModel.h"
 #include "GUI/Models/IntensityDataItem.h"
@@ -151,7 +152,7 @@ TEST_F(TestSaveService, test_failingSaveService)
     QSignalSpy spySaveService(&service, SIGNAL(projectSaved()));
 
     service.setDocument(document.get());
-    EXPECT_THROW(service.save(projectFileName), GUIHelpers::Error);
+    EXPECT_THROW(service.save(projectFileName), Error);
 
     EXPECT_EQ(spySaveService.count(), 0);
     EXPECT_FALSE(ProjectUtils::exists(projectFileName));
diff --git a/Tests/UnitTests/GUI/TestSavingSpecularData.cpp b/Tests/UnitTests/GUI/TestSavingSpecularData.cpp
index cbce4a700ba..201a05db000 100644
--- a/Tests/UnitTests/GUI/TestSavingSpecularData.cpp
+++ b/Tests/UnitTests/GUI/TestSavingSpecularData.cpp
@@ -2,6 +2,7 @@
 #include "Device/Histo/IntensityDataIOFactory.h"
 #include "GUI/Models/ApplicationModels.h"
 #include "GUI/Models/DataItem.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/GroupItem.h"
 #include "GUI/Models/InstrumentItems.h"
 #include "GUI/Models/InstrumentModel.h"
@@ -14,7 +15,6 @@
 #include "GUI/Models/SpecularBeamInclinationItem.h"
 #include "GUI/mainwindow/OutputDataIOService.h"
 #include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/UnitTests/GUI/Utils.h"
 #include <QTest>
@@ -176,7 +176,7 @@ TEST_F(TestSavingSpecularData, test_DirHistory)
     EXPECT_FALSE(history.wasModifiedSinceLastSave(item1));
 
     // Attempt to save same item second time
-    EXPECT_THROW(history.markAsSaved(item1), GUIHelpers::Error);
+    EXPECT_THROW(history.markAsSaved(item1), Error);
 
     // Modifying item
     QTest::qSleep(10);
diff --git a/Tests/UnitTests/GUI/TestSessionItemTags.cpp b/Tests/UnitTests/GUI/TestSessionItemTags.cpp
index afc93388f8c..1ddadc7e3f2 100644
--- a/Tests/UnitTests/GUI/TestSessionItemTags.cpp
+++ b/Tests/UnitTests/GUI/TestSessionItemTags.cpp
@@ -1,5 +1,5 @@
+#include "GUI/Models/Error.h"
 #include "GUI/Models/SessionItemTags.h"
-#include "GUI/utils/GUIHelpers.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestSessionItemTags : public ::testing::Test {
@@ -73,7 +73,7 @@ TEST_F(TestSessionItemTags, tagStartIndex)
     EXPECT_EQ(tags.childCount("tag1"), 2);
     EXPECT_EQ(tags.childCount("tag2"), 0);
     // attempt to add too much
-    EXPECT_THROW(tags.addChild("tag1"), GUIHelpers::Error);
+    EXPECT_THROW(tags.addChild("tag1"), Error);
 
     // checking start index
     EXPECT_EQ(tags.tagStartIndex("tag1"), 0);
@@ -86,7 +86,7 @@ TEST_F(TestSessionItemTags, tagStartIndex)
 
     // removing too much child
     tags.removeChild("tag1");
-    EXPECT_THROW(tags.removeChild("tag1"), GUIHelpers::Error);
+    EXPECT_THROW(tags.removeChild("tag1"), Error);
     EXPECT_EQ(tags.tagStartIndex("tag1"), 0);
     EXPECT_EQ(tags.tagStartIndex("tag2"), 0);
 }
@@ -106,8 +106,8 @@ TEST_F(TestSessionItemTags, indexFromTagRow)
     EXPECT_EQ(tags.indexFromTagRow("tag1", 0), 0);
     EXPECT_EQ(tags.indexFromTagRow("tag1", 1), 1);
     EXPECT_EQ(tags.indexFromTagRow("tag1", 2), 2);
-    EXPECT_THROW(tags.indexFromTagRow("tag1", 3), GUIHelpers::Error);
-    EXPECT_THROW(tags.indexFromTagRow("tag1", -1), GUIHelpers::Error);
+    EXPECT_THROW(tags.indexFromTagRow("tag1", 3), Error);
+    EXPECT_THROW(tags.indexFromTagRow("tag1", -1), Error);
 
     EXPECT_EQ(tags.indexFromTagRow("tag2", 0), 3);
     EXPECT_EQ(tags.indexFromTagRow("tag2", 1), 4);
diff --git a/Tests/UnitTests/GUI/Utils.cpp b/Tests/UnitTests/GUI/Utils.cpp
index d60f37d2284..5391e9aa8e7 100644
--- a/Tests/UnitTests/GUI/Utils.cpp
+++ b/Tests/UnitTests/GUI/Utils.cpp
@@ -16,10 +16,10 @@
 #include "Tests/UnitTests/GUI/Utils.h"
 #include "Device/Data/DataUtils.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
+#include "GUI/Models/Error.h"
 #include "GUI/Models/RealDataItem.h"
 #include "GUI/Models/SessionModel.h"
 #include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/GUIHelpers.h"
 #include <QDir>
 
 namespace {
@@ -33,8 +33,8 @@ void GuiUnittestUtils::create_dir(const QString& dir_name)
         ProjectUtils::removeRecursively(dir_name);
 
     if (!QDir(".").mkdir(dir_name))
-        throw GUIHelpers::Error("GuiUnittestUtils::create_dir() -> Error. Can't create '" + dir_name
-                                + "' in parent directory '.'.");
+        throw Error("GuiUnittestUtils::create_dir() -> Error. Can't create '" + dir_name
+                    + "' in parent directory '.'.");
 }
 
 std::unique_ptr<OutputData<double>> GuiUnittestUtils::createData(double value, DIM n_dim)
-- 
GitLab