Skip to content

Commit

Permalink
warning?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Sep 8, 2024
1 parent 0fe7434 commit 74cfce6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .aux/test_with_lcg
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CMTCONFIG=$2
source /cvmfs/sft.cern.ch/lcg/views/${LCG}/${CMTCONFIG}/setup.sh
source build/INSTALL/thisostap.sh
cd build
ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -j4 --output-on-failure --test-output-size-failed=5000000
ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -j4 -R '(core|runit|logger)' --output-on-failure --test-output-size-failed=5000000
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ set (CPACK_PACKAGE_VERSION_MINOR "${OSTAP_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${OSTAP_VERSION_PATCH}")
set (CPACK_PACKAGE_VERSION_TWEAK "${OSTAP_VERSION_TWEAK}")
set (CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/docs/ostap.jpg )
if ( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.7" )
set ( CPACK_PACKAGE_CHECKSUM "SHA1" )
endif()
include (CPack)
24 changes: 16 additions & 8 deletions source/src/Error2Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
* @author Vanya Belyaev [email protected]
*/
// ============================================================================
// #include <iostream>
namespace
{
// ==========================================================================
/// (previous) error handler
ErrorHandlerFunc_t s_handler = nullptr ;
// ==========================================================================
void errorHandler ( int level ,
Bool_t abort ,
const char* location ,
const char* message )
void errorHandler
( int level ,
Bool_t abort ,
const char* location ,
const char* message )
{
//
if ( gErrorIgnoreLevel == kUnset )
Expand All @@ -58,9 +58,17 @@ namespace
}
else if ( kWarning <= level && Py_IsInitialized() )
{
// python warning here
PyErr_WarnExplicit( NULL, (char*)message, (char*)location, 0, (char*)"ROOT", NULL );
// std::cerr << " RAWNING HERE: loc:" << location << " mg:" << message << std::endl ;
// ====================================================================
// python warning here
// ====================================================================
PyErr_WarnExplicit
( PyExc_RuntimeWarning , // NULL
message , // (char*)
location , // (char*)
0 , //
"ROOT" , // (char*)
NULL ) ;
// ====================================================================
}
else if ( nullptr != s_handler && s_handler != &errorHandler )
{ (*s_handler) ( level , abort , location , message ) ; }
Expand Down

0 comments on commit 74cfce6

Please sign in to comment.