GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #208 from serge-sans-paille/feature/better-error-r… · lavaux/xtensor-python@4ffcfb7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • include/xtensor-python
    • pycontainer.hpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎include/xtensor-python/pycontainer.hpp‎

Copy file name to clipboardExpand all lines: include/xtensor-python/pycontainer.hpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <cmath>
1414
#include <functional>
1515
#include <numeric>
16+
#include <sstream>
1617

1718
#include "pybind11/complex.h"
1819
#include "pybind11/pybind11.h"
@@ -356,7 +357,10 @@ namespace xt
356357
{
357358
if(new_dim != N)
358359
{
359-
throw std::runtime_error("Dims not matching.");
360+
std::ostringstream err_msg;
361+
err_msg << "Invalid conversion to pycontainer, expecting a container of dimension "
362+
<< N << ", got a container of dimension " << new_dim << ".";
363+
throw std::runtime_error(err_msg.str());
360364
}
361365
return new_dim == N;
362366
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.