Revisión | da0cf79a76371e372912d79ed834632590ed30e8 (tree) |
---|---|
Tiempo | 2013-07-12 13:15:23 |
Autor | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
Add LapackInfo key value pair into Exception. #31712
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1385 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -152,6 +152,11 @@ RENUMSTR_BEGIN( MultipoleType, MultipoleTypeStr ) | ||
152 | 152 | RENUMSTR( MultipoleType_end, "MultipoleType_end" ) |
153 | 153 | RENUMSTR_END() |
154 | 154 | |
155 | +RENUMSTR_BEGIN( ExceptionKey, ExceptionKeyStr ) | |
156 | + RENUMSTR( LapackInfo, "LapackInfo" ) | |
157 | + RENUMSTR( ExceptionKey_end, "ExceptionKey_end" ) | |
158 | +RENUMSTR_END() | |
159 | + | |
155 | 160 | } |
156 | 161 | #endif |
157 | 162 |
@@ -37,6 +37,7 @@ | ||
37 | 37 | #include"../base/PrintController.h" |
38 | 38 | #include"../base/MolDSException.h" |
39 | 39 | #include"../base/Uncopyable.h" |
40 | +#include"../base/Enums.h" | |
40 | 41 | #include"Lapack.h" |
41 | 42 | |
42 | 43 | #ifdef __INTEL_COMPILER |
@@ -116,7 +117,9 @@ molds_lapack_int Lapack::Dsyevd(double** matrix, double* eigenValues, molds_lapa | ||
116 | 117 | if(size < 1 ){ |
117 | 118 | stringstream ss; |
118 | 119 | ss << errorMessageDsyevdSize; |
119 | - throw MolDSException(ss.str()); | |
120 | + MolDSException ex(ss.str()); | |
121 | + ex.SetKeyValue<int>(LapackInfo, info); | |
122 | + throw ex; | |
120 | 123 | } |
121 | 124 | else if(size == 1){ |
122 | 125 | lwork = 1; |
@@ -192,7 +195,9 @@ molds_lapack_int Lapack::Dsyevd(double** matrix, double* eigenValues, molds_lapa | ||
192 | 195 | stringstream ss; |
193 | 196 | ss << errorMessageDsyevdInfo; |
194 | 197 | ss << info << endl; |
195 | - throw MolDSException(ss.str()); | |
198 | + MolDSException ex(ss.str()); | |
199 | + ex.SetKeyValue<int>(LapackInfo, info); | |
200 | + throw ex; | |
196 | 201 | } |
197 | 202 | return info; |
198 | 203 | } |
@@ -272,7 +277,9 @@ molds_lapack_int Lapack::Dsysv(double const* const* matrix, double* b, molds_lap | ||
272 | 277 | stringstream ss; |
273 | 278 | ss << errorMessageDsysvInfo; |
274 | 279 | ss << info << endl; |
275 | - throw MolDSException(ss.str()); | |
280 | + MolDSException ex(ss.str()); | |
281 | + ex.SetKeyValue<int>(LapackInfo, info); | |
282 | + throw ex; | |
276 | 283 | } |
277 | 284 | return info; |
278 | 285 | } |
@@ -392,7 +399,9 @@ molds_lapack_int Lapack::Dgetrf(double* matrix, molds_lapack_int* ipiv, molds_la | ||
392 | 399 | stringstream ss; |
393 | 400 | ss << errorMessageDgetrfInfo; |
394 | 401 | ss << info << endl; |
395 | - throw MolDSException(ss.str()); | |
402 | + MolDSException ex(ss.str()); | |
403 | + ex.SetKeyValue<int>(LapackInfo, info); | |
404 | + throw ex; | |
396 | 405 | } |
397 | 406 | return info; |
398 | 407 | } |