@@ -206,6 +206,8 @@ class ValueFactory {
206
206
} catch (std::out_of_range &e) {
207
207
throw Exception (ExceptionType::OUT_OF_RANGE,
208
208
" Numeric value out of range." );
209
+ } catch (std::invalid_argument &e) {
210
+ throw Exception (" Invalid input syntax for bigint: \' " + str + " \' " );
209
211
}
210
212
if (bigint > PELOTON_INT64_MAX || bigint < PELOTON_INT64_MIN)
211
213
throw Exception (ExceptionType::OUT_OF_RANGE,
@@ -312,6 +314,8 @@ class ValueFactory {
312
314
} catch (std::out_of_range &e) {
313
315
throw Exception (ExceptionType::OUT_OF_RANGE,
314
316
" Numeric value out of range." );
317
+ } catch (std::invalid_argument &e) {
318
+ throw Exception (" Invalid input syntax for smallint: \' " + str + " \' " );
315
319
}
316
320
if (smallint < PELOTON_INT16_MIN)
317
321
throw Exception (ExceptionType::OUT_OF_RANGE,
@@ -370,6 +374,8 @@ class ValueFactory {
370
374
} catch (std::out_of_range &e) {
371
375
throw Exception (ExceptionType::OUT_OF_RANGE,
372
376
" Numeric value out of range." );
377
+ } catch (std::invalid_argument &e) {
378
+ throw Exception (" Invalid input syntax for tinyint: \' " + str + " \' " );
373
379
}
374
380
if (tinyint < PELOTON_INT8_MIN)
375
381
throw Exception (ExceptionType::OUT_OF_RANGE,
@@ -408,6 +414,8 @@ class ValueFactory {
408
414
} catch (std::out_of_range &e) {
409
415
throw Exception (ExceptionType::OUT_OF_RANGE,
410
416
" Numeric value out of range." );
417
+ } catch (std::invalid_argument &e) {
418
+ throw Exception (" Invalid input syntax for decimal: \' " + str + " \' " );
411
419
}
412
420
if (res > PELOTON_DECIMAL_MAX || res < PELOTON_DECIMAL_MIN)
413
421
throw Exception (ExceptionType::OUT_OF_RANGE,
0 commit comments