diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index a3ba8e4..c76d599 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -2330,7 +2330,7 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList) if ( ! pMachMgr->DispositionSpecialApply( nOperId, true)) { bOk = false ; if ( pMachMgr->GetLastErrorId() != 0) - sErrList += pMachMgr->GetLastErrorString() + "\r\n" ; + sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() + "\r\n" ; if ( bStopOnFirstErr) break ; } @@ -2339,8 +2339,13 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList) pMachMgr->SetCurrMachining( nOperId) ; if ( ! pMachMgr->MachiningApply( true)) { bOk = false ; - if ( pMachMgr->GetLastErrorId() != 0) - sErrList += pMachMgr->GetLastErrorString() + "\r\n" ; + if ( pMachMgr->GetLastErrorId() != 0) { + sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() ; + string sInfo = pMachMgr->GetOutstrokeInfo( ExeUiUnitsAreMM()) ; + if ( ! sInfo.empty()) + sErrList += sInfo ; + sErrList += "\r\n" ; + } if ( bStopOnFirstErr) break ; } diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 0fabe34..df6305e 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/PhotoObj.cpp b/PhotoObj.cpp index d5ab93d..f3d5bfa 100644 --- a/PhotoObj.cpp +++ b/PhotoObj.cpp @@ -15,6 +15,7 @@ #include "stdafx.h" #include "PhotoObj.h" #include "GseContext.h" +#include "EXE.h" #include "/EgtDev/Include/EXeExecutor.h" #include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EGrScene.h" @@ -23,7 +24,7 @@ #include "/EgtDev/Include/EGkStringUtils3d.h" #include "/EgtDev/Include/EGnStringKeyVal.h" #include "/EgtDev/Include/EGnFileUtils.h" - +// per far dimenticare macro di WinUser.h #undef GetClassName using namespace std ; @@ -151,11 +152,26 @@ PhotoObj::Load( const STRVECTOR& vString, int nBaseGdbId) // sostituzione dell'eventuale riferimento al nome del progetto nella path ReplaceString( m_sPath, SUB_PROJECT_TITLE, sFileTitle) ; // carico la texture dalla path indicata - if ( ExistsFile( m_sPath)) - return ExeLoadTexture( m_sName, m_sPath, 0, m_dDimX, m_dDimY, TXR_CLAMP) ; + if ( ExistsFile( m_sPath)) { + if ( ! ExeLoadTexture( m_sName, m_sPath, 0, m_dDimX, m_dDimY, TXR_CLAMP)) { + string sOut = "Error loading image " + m_sPath ; + LOG_ERROR( GetLogger(), sOut.c_str()) + } + return true ; + } // provo dalla path del progetto corrente - string sName = GetFileName( m_sPath) ; - return ExeLoadTexture( m_sName, sFileDir + "\\" + sName, 0, m_dDimX, m_dDimY, TXR_CLAMP) ; + string sOtherPath = sFileDir + "\\" + GetFileName( m_sPath) ; + if ( ExistsFile( sOtherPath)) { + if ( ! ExeLoadTexture( m_sName, sOtherPath, 0, m_dDimX, m_dDimY, TXR_CLAMP)) { + string sOut = "Error loading image " + sOtherPath ; + LOG_ERROR( GetLogger(), sOut.c_str()) + } + } + else { + string sOut = "Error missing image " + sOtherPath ; + LOG_ERROR( GetLogger(), sOut.c_str()) + } + return true ; } // altrimenti ne verifico solo l'esistenza else { @@ -172,8 +188,12 @@ PhotoObj::Load( const STRVECTOR& vString, int nBaseGdbId) if ( ExistsFile( m_sPath)) return true ; // provo dalla path del progetto corrente - string sName = GetFileName( m_sPath) ; - return ExistsFile( sFileDir + "\\" + sName) ; + string sOtherPath = sFileDir + "\\" + GetFileName( m_sPath) ; + if ( ! ExistsFile( sOtherPath)) { + string sOut = "Error missing image " + sOtherPath ; + LOG_ERROR( GetLogger(), sOut.c_str()) + } + return true ; } }