@@ -59,7 +59,7 @@ namespace eval ::osvvm {
5959# CallbackBefore_Xxx, CallbackAfter_Xxx
6060#
6161 proc CallbackBefore_Build {Path_Or_File args} {
62- # puts "Build Before ${Path_Or_File}"
62+ # puts "Build Before ${Path_Or_File}"
6363 }
6464 proc CallbackAfter_Build {Path_Or_File args} {
6565# puts "Build After ${Path_Or_File}"
@@ -105,13 +105,15 @@ namespace eval ::osvvm {
105105
106106 proc CallbackOnError_Build {Path_Or_File BuildErrorMessage LocalBuildErrorInfo} {
107107 set ::osvvm::BuildErrorInfo $LocalBuildErrorInfo
108- if {$::osvvm::FailOnBuildErrors } {
109- # error "For tcl errorInfo, puts \$::osvvm::BuildErrorInfo"
110- puts " Error: For tcl errorInfo, puts \$ ::osvvm::BuildErrorInfo. Signaling TCL Error"
111- error " $BuildErrorMessage "
108+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
109+ puts " Build Error: Info from \$ ::osvvm::BuildErrorInfo "
110+ puts " $::osvvm::BuildErrorInfo "
112111 } else {
113- puts " Error: For tcl errorInfo, puts \$ ::osvvm::BuildErrorInfo"
112+ puts " Build Error: For tcl errorInfo, puts \$ ::osvvm::BuildErrorInfo. "
114113 }
114+ if {$::osvvm::FailOnBuildErrors } {
115+ error $BuildErrorMessage
116+ }
115117 }
116118
117119 proc CallbackOnError_FindIncludeFile {Path_Or_File CommandName} {
@@ -123,21 +125,36 @@ namespace eval ::osvvm {
123125 set ::osvvm::LibraryErrorInfo $::errorInfo
124126 puts " LibraryError: $ErrMsg "
125127 puts " LibraryError: library $LibraryName $PathToLib failed in $ErrInProc See messages above"
126- puts " For tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
128+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
129+ puts " LibraryError: Info from \$ ::osvvm::LibraryErrorInfo"
130+ puts " $::osvvm::LibraryErrorInfo "
131+ } else {
132+ puts " LibraryError: For Tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
133+ }
127134 error " LibraryError: $ErrMsg "
128135 }
129136
130137 proc CallbackOnError_LinkLibrary {Message} {
131138 set ::osvvm::LibraryErrorInfo $::errorInfo
132- puts " LibraryError: $Message See messages above"
133- puts " For tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
139+ puts " LibraryError: LinkLibrary $Message See messages above"
140+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
141+ puts " LibraryError: Info from \$ ::osvvm::LibraryErrorInfo"
142+ puts " $::osvvm::LibraryErrorInfo "
143+ } else {
144+ puts " LibraryError: For Tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
145+ }
134146 error " $Message "
135147 }
136148
137149 proc CallbackOnError_RemoveLibraryDirectory {Message} {
138150 set ::osvvm::LibraryErrorInfo $::errorInfo
139- puts " LibraryError: $Message See messages above"
140- puts " For tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
151+ puts " LibraryError: RemoveLibraryDirectory $Message See messages above"
152+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
153+ puts " LibraryError: Info from \$ ::osvvm::LibraryErrorInfo"
154+ puts " $::osvvm::LibraryErrorInfo "
155+ } else {
156+ puts " LibraryError: For Tcl errorInfo, puts \$ ::osvvm::LibraryErrorInfo"
157+ }
141158 error " $Message "
142159 }
143160
@@ -151,8 +168,14 @@ namespace eval ::osvvm {
151168
152169 set AnalyzeErrorCount [expr $AnalyzeErrorCount +1]
153170# set ConsecutiveAnalyzeErrors [expr $ConsecutiveAnalyzeErrors+1]
171+
154172 puts " AnalyzeError: See messages above in \" analyze $args \" "
155- puts " For tcl errorInfo, puts \$ ::osvvm::AnalyzeErrorInfo"
173+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
174+ puts " AnalyzeError: Info from \$ ::osvvm::AnalyzeErrorInfo"
175+ puts " $::osvvm::AnalyzeErrorInfo "
176+ } else {
177+ puts " AnalyzeError: For Tcl errorInfo, puts \$ ::osvvm::AnalyzeErrorInfo"
178+ }
156179
157180 # These settings are in OsvvmDefaultSettings. Override them in LocalScriptDefaults.tcl
158181 if {$AnalyzeErrorStopCount != 0 && $AnalyzeErrorCount >= $AnalyzeErrorStopCount } {
@@ -169,7 +192,12 @@ namespace eval ::osvvm {
169192 set SimulateErrorCount [expr $SimulateErrorCount +1]
170193# set ConsecutiveSimulateErrors [expr $ConsecutiveSimulateErrors+1]
171194 puts " SimulateError: See messages above in \" simulate $args \" "
172- puts " For tcl errorInfo, puts \$ ::osvvm::SimulateErrorInfo"
195+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
196+ puts " SimulateError: Info from \$ ::osvvm::SimulateErrorInfo"
197+ puts " $::osvvm::SimulateErrorInfo "
198+ } else {
199+ puts " SimulateError: For Tcl errorInfo, puts \$ ::osvvm::SimulateErrorInfo"
200+ }
173201
174202 # These settings are in OsvvmDefaultSettings. Override them in LocalScriptDefaults.tcl
175203 if {$SimulateErrorStopCount != 0 && $SimulateErrorCount >= $SimulateErrorStopCount } {
@@ -184,7 +212,12 @@ namespace eval ::osvvm {
184212 set ::osvvm::WaveErrorInfo $LocalErrorInfo
185213
186214 puts " WaveError: Error while doing source $Directory /wave.do during simulate $LibraryUnit : $ErrMsg "
187- puts " For tcl errorInfo, puts \$ ::osvvm::WaveErrorInfo"
215+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
216+ puts " WaveError: Info from \$ ::osvvm::WaveErrorInfo"
217+ puts " $::osvvm::WaveErrorInfo "
218+ } else {
219+ puts " WaveError: For Tcl errorInfo, puts \$ ::osvvm::WaveErrorInfo"
220+ }
188221
189222 # No errors are signaled here
190223 }
@@ -201,7 +234,12 @@ namespace eval ::osvvm {
201234 puts " ScriptError: during build. See previous messages for details."
202235 puts " Please include your simulator version in any issue reports"
203236 puts " For tcl errorInfo, puts \$ ::osvvm::BuildReportErrorInfo"
204-
237+ if {$::osvvm::TclDebug || $::osvvm::Debug } {
238+ puts " ScriptError: Info from \$ ::osvvm::BuildReportErrorInfo"
239+ puts " $::osvvm::BuildReportErrorInfo "
240+ } else {
241+ puts " ScriptError: For Tcl errorInfo, puts \$ ::osvvm::BuildReportErrorInfo"
242+ }
205243 # Errors are signaled later in the build
206244 }
207245
@@ -253,7 +291,7 @@ namespace eval ::osvvm {
253291 set ::osvvm::SimulateReportErrorInfo $LocalReportErrorInfo
254292 # Continue current build
255293 puts " ReportError: Simulate2Html failed. See previous messages for details"
256- if {$::osvvm::Debug } {
294+ if {$::osvvm::TclDebug || $::osvvm:: Debug } {
257295 puts " errorInfo: $::osvvm::SimulateReportErrorInfo "
258296 }
259297
0 commit comments