Skip to content
Snippets Groups Projects
Select Git revision
  • e1be70976358786d1b5f3655bb0dfb7c735ebf3d
  • master default protected
  • noelp-master-patch-87404
  • disable-view
  • experimental_rel
  • test_quiggeldy_service
  • update-arbor-0.10.0
  • image_build
  • spack_v0.22.1
  • ebrains-24-04
  • update-readme
  • create-module-file
  • add-nestml-tests
  • feat_add_py-norse
  • update-libneuroml
  • update-bluebrain-packages
  • feat_arbor_install_all_binaries
  • ebrains-23.09-jsc-site-config
  • spack-v0.20.0
  • ebrains-23-09-spack-v0.19.2
  • ebrains-23-09
21 results

package.py

Blame
  • error.hpp 427 B
    #pragma once
    
    #include <stdexcept>
    #include <string>
    
    namespace pyarb {
    
    // Python wrapper errors
    
    struct pyarb_error: std::runtime_error {
        pyarb_error(const std::string& what_msg):
            std::runtime_error(what_msg) {}
        pyarb_error(const char* what_msg):
            std::runtime_error(what_msg) {}
    };
    
    inline
    void assert_throw(bool pred, const char* msg) {
        if (!pred) throw pyarb_error(msg);
    }
    
    } // namespace pyarb