[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Thu Jun 23 14:26:02 UTC 2016


 sc/source/core/opencl/formulagroupcl.cxx |   66 +++++++++----
 sc/source/core/opencl/op_database.cxx    |  148 +++++++++++++++----------------
 sc/source/core/opencl/op_logical.cxx     |    2 
 sc/source/core/opencl/op_math.cxx        |   10 +-
 sc/source/core/opencl/op_statistical.cxx |   14 +-
 sc/source/core/opencl/opbase.cxx         |    2 
 sc/source/core/opencl/opbase.hxx         |    4 
 7 files changed, 134 insertions(+), 112 deletions(-)

New commits:
commit 7000e1a0640156645252d15d505949bff3d1eb4a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Jun 23 16:57:25 2016 +0300

    Improve OpenCL logging and warnings
    
    Explicitly catch and report the 'Unhandled' and 'OpenCLError'
    exceptions, too, in DynamicKernel::create, instead of relying on a
    catch(...).
    
    (Actually not sure why we need three separate classes of OpenCL
    handling exceptions.)
    
    We have the code to show the file and line where something exceptional
    (or actually not so exceptional) happens with OpenCL, so make use of
    that then.
    
    It is a perfectly normal thing to throw (and catch) at least the
    UnhandledToken and Unhandled exceptions (when compiling a formula and
    noticing that we don't want to use OpenCL for it after all), so it
    does not make sense SAL_WARN about them. Just SAL_INFO is fine.
    
    Change-Id: I56770f47622cb4bc40f2216c5e78d3da3c7c9adf

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index c3167e3..3427d9f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -203,7 +203,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
     }
     else
     {
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     // Obtain cl context
     ::opencl::KernelEnv kEnv;
@@ -280,7 +280,7 @@ public:
     {
         std::stringstream ss;
         if (GetFormulaToken()->GetType() != formula::svString)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         FormulaToken* Tok = GetFormulaToken();
         ss << Tok->GetString().getString().toAsciiUpperCase().hashCode() << "U";
         return ss.str();
@@ -301,7 +301,7 @@ public:
         }
         else
         {
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         }
 
         // Pass the scalar result back to the rest of the formula kernel
@@ -336,7 +336,7 @@ public:
     virtual std::string GenSlidingWindowDeclRef( bool = false ) const override
     {
         if (GetFormulaToken()->GetType() != formula::svDouble)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         return mSymName;
     }
     virtual size_t GetWindowSize() const override
@@ -347,7 +347,7 @@ public:
     {
         FormulaToken* Tok = GetFormulaToken();
         if (Tok->GetType() != formula::svDouble)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         return Tok->GetDouble();
     }
     /// Create buffer and pass the buffer to a given kernel
@@ -963,7 +963,7 @@ public:
     {
         FormulaToken* t = ft->GetFormulaToken();
         if (t->GetType() != formula::svDoubleVectorRef)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         mpDVR = static_cast<const formula::DoubleVectorRefToken*>(t);
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
@@ -1263,7 +1263,7 @@ public:
     {
         FormulaToken* t = ft->GetFormulaToken();
         if (t->GetType() != formula::svDoubleVectorRef)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         mpDVR = static_cast<const formula::DoubleVectorRefToken*>(t);
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
@@ -1493,7 +1493,7 @@ public:
         size_t nCurWindowSize = mpDVR->GetRefRowSize();
         // create clmem buffer
         if (mpDVR->GetArrays()[Base::mnIndex].mpNumericArray == nullptr)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         double* pHostBuffer = const_cast<double*>(
             mpDVR->GetArrays()[Base::mnIndex].mpNumericArray);
         size_t szHostBuffer = nInput * sizeof(double);
@@ -1854,7 +1854,7 @@ public:
                     ((!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
                         || (pCurDVR->IsStartFixed() && pCurDVR->IsEndFixed()))
                     )
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
             }
         }
         ss << ") {\n";
@@ -2498,7 +2498,7 @@ public:
         else
         {
             if (mvSubArguments.size() != 2)
-                throw Unhandled();
+                throw Unhandled(__FILE__, __LINE__);
             bool bArgument1_NeedNested =
                 mvSubArguments[0]->GetFormulaToken()->GetType()
                 != formula::svSingleVectorRef;
@@ -2612,10 +2612,10 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
     {
         FormulaTreeNodeRef rChild = ft->Children[i];
         if (!rChild)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         FormulaToken* pChild = rChild->GetFormulaToken();
         if (!pChild)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         OpCode opc = pChild->GetOpCode();
         std::stringstream tmpname;
         tmpname << s << "_" << i;
@@ -2658,7 +2658,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
                             {
                                 // Can't handle
                                 SAL_INFO("sc.opencl", "Strings but can't do that.");
-                                throw UnhandledToken(("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str());
+                                throw UnhandledToken(("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str(), __FILE__, __LINE__);
                             }
                             else
                             {
@@ -2770,7 +2770,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
                 else
                 {
                     SAL_INFO("sc.opencl", "Fallback case, rejecting for OpenCL");
-                    throw UnhandledToken(("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str());
+                    throw UnhandledToken(("unhandled operand " + StackVarEnumToString(pChild->GetType()) + " for ocPush").c_str(), __FILE__, __LINE__);
                 }
                 break;
             case ocDiv:
@@ -3660,11 +3660,11 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(const ScCalcConfig& config,
                             new OpGestep, nResultSize));
                 }
                 else
-                    throw UnhandledToken("unhandled opcode");
+                    throw UnhandledToken("unhandled opcode", __FILE__, __LINE__);
                 break;
 
             default:
-                throw UnhandledToken("unhandled opcode");
+                throw UnhandledToken("unhandled opcode", __FILE__, __LINE__);
         }
     }
 }
@@ -4033,13 +4033,35 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
     }
     catch (const UnhandledToken& ut)
     {
-        SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled token: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
+        SAL_INFO("sc.opencl", "Dynamic formula compiler: UnhandledToken: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
+        delete pDynamicKernel;
+        return nullptr;
+    }
+    catch (const OpenCLError& oce)
+    {
+        // I think OpenCLError exceptions are actually exceptional (unexpected), so do use SAL_WARN
+        // here.
+        SAL_WARN("sc.opencl", "Dynamic formula compiler: OpenCLError from " << oce.mFunction << ": " << ::opencl::errorString(oce.mError) << "at " << oce.mFile << ":" << oce.mLineNumber);
+
+        // OpenCLError used to go to the catch-all below, and not delete pDynamicKernel. Was that
+        // intentional, should we not do it here then either?
+        delete pDynamicKernel;
+        return nullptr;
+    }
+    catch (const Unhandled& uh)
+    {
+        SAL_INFO("sc.opencl", "Dynamic formula compiler: Unhandled at " << uh.mFile << ":" << uh.mLineNumber);
+
+        // Unhandled used to go to the catch-all below, and not delete pDynamicKernel. Was that
+        // intentional, should we not do it here then either?
         delete pDynamicKernel;
         return nullptr;
     }
     catch (...)
     {
-        SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled compiler error");
+        // FIXME: Do we really want to catch random exceptions here?
+        SAL_WARN("sc.opencl", "Dynamic formula compiler: unexpected exception");
+        // FIXME: Not deleting pDynamicKernel here!?, is that intentional?
         return nullptr;
     }
     return pDynamicKernel;
@@ -4149,22 +4171,22 @@ public:
         }
         catch (const UnhandledToken& ut)
         {
-            SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled token: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
+            SAL_INFO("sc.opencl", "Dynamic formula compiler: UnhandledToken: " << ut.mMessage << " at " << ut.mFile << ":" << ut.mLineNumber);
             return CLInterpreterResult();
         }
         catch (const OpenCLError& oce)
         {
-            SAL_WARN("sc.opencl", "Dynamic formula compiler: OpenCL error from " << oce.mFunction << ": " << ::opencl::errorString(oce.mError) << " at " << oce.mFile << ":" << oce.mLineNumber);
+            SAL_WARN("sc.opencl", "Dynamic formula compiler: OpenCLError from " << oce.mFunction << ": " << ::opencl::errorString(oce.mError) << " at " << oce.mFile << ":" << oce.mLineNumber);
             return CLInterpreterResult();
         }
         catch (const Unhandled& uh)
         {
-            SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled case at " << uh.mFile << ":" << uh.mLineNumber);
+            SAL_INFO("sc.opencl", "Dynamic formula compiler: Unhandled at " << uh.mFile << ":" << uh.mLineNumber);
             return CLInterpreterResult();
         }
         catch (...)
         {
-            SAL_WARN("sc.opencl", "Dynamic formula compiler: unhandled compiler error");
+            SAL_WARN("sc.opencl", "Dynamic formula compiler: unexpected exception");
             return CLInterpreterResult();
         }
 
diff --git a/sc/source/core/opencl/op_database.cxx b/sc/source/core/opencl/op_database.cxx
index 6626e71..29c8df2 100644
--- a/sc/source/core/opencl/op_database.cxx
+++ b/sc/source/core/opencl/op_database.cxx
@@ -48,7 +48,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -62,7 +62,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -76,10 +76,10 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -101,7 +101,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -117,7 +117,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -178,7 +178,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -192,7 +192,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -206,10 +206,10 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -232,7 +232,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -248,7 +248,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -309,7 +309,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -323,7 +323,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -337,10 +337,10 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -362,7 +362,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -378,7 +378,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -439,7 +439,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -453,7 +453,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -467,10 +467,10 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -493,7 +493,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -509,7 +509,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -574,7 +574,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -588,7 +588,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -602,10 +602,10 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -628,7 +628,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -644,7 +644,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -679,7 +679,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -695,7 +695,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -759,7 +759,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -773,7 +773,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -787,10 +787,10 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -813,7 +813,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -829,7 +829,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -864,7 +864,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -880,7 +880,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -942,7 +942,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -956,7 +956,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -970,10 +970,10 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -996,7 +996,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1012,7 +1012,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1074,7 +1074,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -1088,7 +1088,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -1102,10 +1102,10 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -1128,7 +1128,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1144,7 +1144,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1179,7 +1179,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1195,7 +1195,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1259,7 +1259,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -1273,7 +1273,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=0;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -1287,10 +1287,10 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -1313,7 +1313,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1329,7 +1329,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1364,7 +1364,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1380,7 +1380,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1442,7 +1442,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -1456,7 +1456,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=DBL_MIN;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -1470,10 +1470,10 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -1496,7 +1496,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1512,7 +1512,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
@@ -1573,7 +1573,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
         dataRow = pCurDVR1->GetArrayLength();
     }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
@@ -1587,7 +1587,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
          ss << "        tmp"<<dataCol<<"=DBL_MIN;\n";
      }
     else
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     int conditionCol = 0;
     int conditionRow = 0;
     if(vSubArguments[dataCol + 1]->GetFormulaToken()->GetType() ==
@@ -1601,10 +1601,10 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
         conditionRow = pCurDVR2->GetArrayLength();
     }
     else{
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
     if(dataCol!=conditionCol)
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
     if(dataCol > 0 && dataRow > 0)
     {
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
@@ -1627,7 +1627,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = 0; i < dataCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "        tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "        if(isNan(tmp"<<i<<"))\n";
@@ -1643,7 +1643,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
             for(int i = dataCol + 1; i < dataCol + 1 + conditionCol; ++i){
                 if(vSubArguments[i]->GetFormulaToken()->GetType() !=
                         formula::svDoubleVectorRef)
-                    throw Unhandled();
+                    throw Unhandled(__FILE__, __LINE__);
                 ss << "                tmp"<<i<<"=";
                 ss << vSubArguments[i]->GenSlidingWindowDeclRef()<<";\n";
                 ss << "                if(!isNan(tmp"<<i<<")){\n";
diff --git a/sc/source/core/opencl/op_logical.cxx b/sc/source/core/opencl/op_logical.cxx
index 698b040..30f1f08 100644
--- a/sc/source/core/opencl/op_logical.cxx
+++ b/sc/source/core/opencl/op_logical.cxx
@@ -318,7 +318,7 @@ void OpIf::GenSlidingWindowFunction(std::stringstream &ss,
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
     if(tmpCur0->GetType() == formula::svDoubleVectorRef)
     {
-        throw UnhandledToken("unknown operand for ocPush");
+        throw UnhandledToken("unknown operand for ocPush", __FILE__, __LINE__);
     }
     else
     {
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index f37ec30..a7c95ad 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -592,7 +592,7 @@ void OpSumIfs::GenSlidingWindowFunction(std::stringstream &ss,
         else if (!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
             ss << "    int offset = get_group_id(1);\n";
         else
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         // actually unreachable
         ss << "    int lidx = get_local_id(0);\n";
         ss << "    __local double shm_buf[256];\n";
@@ -2658,7 +2658,7 @@ void OpConvert::GenSlidingWindowFunction(
         (arg1==108&&arg2==5584)||
         (arg1==5665&&arg2==268206)||
         (arg1==268206&&arg2==5665)) )
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
 
     FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
     const formula::SingleVectorRefToken*tmpCurDVR= static_cast<const
@@ -2813,7 +2813,7 @@ void OpAverageIf::GenSlidingWindowFunction(std::stringstream &ss,
         loopTimes = paraOneWidth;
         if(paraOneWidth > 1)
         {
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         }
     }
 
@@ -2827,7 +2827,7 @@ void OpAverageIf::GenSlidingWindowFunction(std::stringstream &ss,
         paraTwoWidth = pCurDVR1->GetArrays().size();
         if(paraTwoWidth > 1)
         {
-            throw Unhandled();
+            throw Unhandled(__FILE__, __LINE__);
         }
         ss << "    i = ";
         if (!pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed()) {
@@ -2859,7 +2859,7 @@ void OpAverageIf::GenSlidingWindowFunction(std::stringstream &ss,
             unsigned paraThreeWidth = pCurDVR2->GetArrays().size();
              if(paraThreeWidth > 1)
             {
-                throw Unhandled();
+                throw Unhandled(__FILE__, __LINE__);
             }
         }
     }
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 7a59167..fb70f19 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -2978,7 +2978,7 @@ void OpCorrel::GenSlidingWindowFunction(
         ->GetType() != formula::svDoubleVectorRef||vSubArguments[1]
         ->GetFormulaToken()->GetType() != formula::svDoubleVectorRef )
         ///only support DoubleVector in OpCorrelfor GPU calculating.
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     const formula::DoubleVectorRefToken* pCurDVRX =
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[0]->GetFormulaToken());
@@ -2986,7 +2986,7 @@ void OpCorrel::GenSlidingWindowFunction(
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[1]->GetFormulaToken());
     if(  pCurDVRX->GetRefRowSize() != pCurDVRY->GetRefRowSize() )
-         throw Unhandled();
+         throw Unhandled(__FILE__, __LINE__);
 
     ss << "\ndouble " << sSymName;
     ss << "_"<< BinFuncName() <<"(";
@@ -3239,7 +3239,7 @@ void OpPearson::GenSlidingWindowFunction(
         ->GetType() != formula::svDoubleVectorRef||vSubArguments[1]
         ->GetFormulaToken()->GetType() != formula::svDoubleVectorRef )
         ///only support DoubleVector in OpPearson for GPU calculating.
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     const formula::DoubleVectorRefToken* pDVR =
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[0]->GetFormulaToken());
@@ -3247,7 +3247,7 @@ void OpPearson::GenSlidingWindowFunction(
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[1]->GetFormulaToken());
     if(  pDVR->GetRefRowSize() != pCurDVRY->GetRefRowSize() )
-         throw Unhandled();
+         throw Unhandled(__FILE__, __LINE__);
 
     size_t nCurWindowSize = pDVR->GetRefRowSize();
 
@@ -3459,7 +3459,7 @@ void OpGeoMean::GenSlidingWindowFunction(
             else if (!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
                 ss << "    offset = get_group_id(1);\n";
             else
-                throw Unhandled();
+                throw Unhandled(__FILE__, __LINE__);
             ss << "    windowSize = ";
             ss << nCurWindowSize;
             ss << ";\n";
@@ -3841,7 +3841,7 @@ void OpRsq::GenSlidingWindowFunction(
         ->GetType() != formula::svDoubleVectorRef||vSubArguments[1]
         ->GetFormulaToken()->GetType() != formula::svDoubleVectorRef )
         ///only support DoubleVector in OpRsq for GPU calculating.
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     const formula::DoubleVectorRefToken* pCurDVR1 =
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[0]->GetFormulaToken());
@@ -3849,7 +3849,7 @@ void OpRsq::GenSlidingWindowFunction(
         static_cast<const formula::DoubleVectorRefToken *>(
         vSubArguments[1]->GetFormulaToken());
     if(  pCurDVR1->GetRefRowSize() != pCurDVR2->GetRefRowSize() )
-         throw Unhandled();
+         throw Unhandled(__FILE__, __LINE__);
 
     size_t nCurWindowSize = pCurDVR1->GetRefRowSize();
 
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index 3fdd3bc..914da51 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -157,7 +157,7 @@ size_t VectorRef::GetWindowSize() const
     }
     else
     {
-        throw Unhandled();
+        throw Unhandled(__FILE__, __LINE__);
     }
 }
 
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index 94c1574..2984f1c 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -31,7 +31,7 @@ class FormulaTreeNode;
 class UnhandledToken
 {
 public:
-    UnhandledToken( const char* m, const std::string& fn = "", int ln = 0 );
+    UnhandledToken( const char* m, const std::string& fn, int ln );
 
     std::string mMessage;
     std::string mFile;
@@ -54,7 +54,7 @@ public:
 class Unhandled
 {
 public:
-    Unhandled( const std::string& fn = "", int ln = 0 );
+    Unhandled( const std::string& fn, int ln );
 
     std::string mFile;
     int mLineNumber;


More information about the Libreoffice-commits mailing list