LCOV - code coverage report
Current view: top level - units - except.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 4 100.0 %
Date: 2024-04-28 01:25:40 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: BSD-3-Clause
       2             : // Copyright (c) 2023 Scipp contributors (https://github.com/scipp)
       3             : /// @file
       4             : /// @author Jan-Lukas Wynen
       5             : #include "scipp/units/except.h"
       6             : 
       7             : namespace scipp::except {
       8         293 : UnitError::UnitError(const std::string &msg) : Error{msg} {}
       9             : 
      10             : template <>
      11          65 : void throw_mismatch_error(const units::Unit &expected,
      12             :                           const units::Unit &actual,
      13             :                           const std::string &optional_message) {
      14         195 :   throw UnitError("Expected unit " + to_string(expected) + ", got " +
      15         260 :                   to_string(actual) + '.' + optional_message);
      16             : }
      17             : } // namespace scipp::except

Generated by: LCOV version 1.14