diff --git a/.decent_ci-Linux.yaml b/.decent_ci-Linux.yaml index 1c15246..dfb5056 100644 --- a/.decent_ci-Linux.yaml +++ b/.decent_ci-Linux.yaml @@ -34,7 +34,7 @@ compilers: cmake_extra_flags: -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DRUN_PERFORMANCE_TESTS:BOOL=ON collect_performance_results: true - name: cppcheck - compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:cmake*" --suppress="*:unittests/catch.hpp" --force + compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:unittests/catch.hpp" --force --suppress="unusedFunction:*" - name: custom_check commands: - ./contrib/check_for_tabs.rb diff --git a/samples/test_num_exceptions.cpp b/samples/test_num_exceptions.cpp index 36bbb75..3a35fb7 100644 --- a/samples/test_num_exceptions.cpp +++ b/samples/test_num_exceptions.cpp @@ -7,20 +7,22 @@ int main( int /*argc*/ , char * /*argv*/[] ) { chaiscript::ChaiScript ch( chaiscript::Std_Lib::library( ) ); - static const char script[ ] = - R""( + + try + { + static const char script[ ] = + R""( class Rectangle { def Rectangle() { } } - var rect = Rectangle( ); + var rect = Rectangle( ); )""; - try - { + ch.eval( script ); } catch ( const std::exception &e )