diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-01-14 23:46:27 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-01-14 23:48:35 +0200 |
commit | 3d47e860b086429ca316611995990e305d7cbb10 (patch) | |
tree | 8fd2ac247ca93d41ac10992e2aac14039cd94729 /sc | |
parent | 8c291bb13335fc73785eab2bba81b37a5161d6b4 (diff) |
Be more informative
Change-Id: I58cd259055b87cd78d7c6936b2e479ff2cd1ed40
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 06d3417fcf7f..b2026317c0e4 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -77,6 +77,42 @@ namespace sc { namespace opencl { namespace { +std::string StackVarEnumToString(StackVarEnum e) +{ + switch (e) + { +#define CASE(x) case sv##x: return #x + CASE(Byte); + CASE(Double); + CASE(String); + CASE(SingleRef); + CASE(DoubleRef); + CASE(Matrix); + CASE(Index); + CASE(Jump); + CASE(External); + CASE(FAP); + CASE(JumpMatrix); + CASE(RefList); + CASE(EmptyCell); + CASE(MatrixCell); + CASE(HybridCell); + CASE(HybridValueCell); + CASE(ExternalSingleRef); + CASE(ExternalDoubleRef); + CASE(ExternalName); + CASE(SingleVectorRef); + CASE(DoubleVectorRef); + CASE(Subroutine); + CASE(Error); + CASE(Missing); + CASE(Sep); + CASE(Unknown); +#undef CASE + } + return std::to_string(static_cast<int>(e)); +} + #ifdef SAL_DETAIL_ENABLE_LOG_INFO std::string linenumberify(const std::string s) { @@ -2553,7 +2589,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments( } else { - throw UnhandledToken(pChild, "unknown operand for ocPush"); + throw UnhandledToken(pChild, ("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str()); } break; case ocDiv: |