@@ -26,8 +26,7 @@ import { WorkspaceState } from "../../state";
2626import { ErrorsLineDecorator } from "./decorators/errorsLineDecorator" ;
2727import { ErrorFlowParameterDecorator } from "./decorators/errorFlowParameterDecorator" ;
2828
29- export class ErrorsViewTab implements ICodeAnalyticsViewTab
30- {
29+ export class ErrorsViewTab implements ICodeAnalyticsViewTab {
3130 private _viewedCodeObjectId ?: string = undefined ;
3231 private _stackViewModel ?: ErrorFlowStackViewModel = undefined ;
3332 private _disposables : vscode . Disposable [ ] = [ ] ;
@@ -38,7 +37,6 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
3837 public static readonly ShowErrorView = `digma.ErrorView.show` ;
3938 } ;
4039
41-
4240 constructor (
4341 private _channel : WebviewChannel ,
4442 private _analyticsProvider : AnalyticsProvider ,
@@ -61,7 +59,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
6159
6260 this . _disposables . push ( vscode . commands . registerCommand ( ErrorsViewTab . Commands . ShowErrorView , async ( codeObjectId : string , codeObjectDisplayName : string , errorSourceUID : string ) => {
6361 const view = this . _webViewProvider . get ( ) ;
64- if ( view === undefined || view . visible === false ) {
62+ if ( view === undefined || view . visible === false ) {
6563
6664 this . _channel . consume ( UiMessage . Notify . TabLoaded , async ( e : UiMessage . Notify . TabLoaded ) => {
6765 this . onShowErrorDetailsEvent ( new UiMessage . Get . ErrorDetails ( errorSourceUID ) ) ;
@@ -130,7 +128,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
130128 }
131129 const document = editor . document ;
132130 let docInfo = await this . _documentInfoProvider . getDocumentInfo ( document ) ;
133- if ( ! docInfo ) {
131+ if ( ! docInfo ) {
134132 return ;
135133 }
136134
@@ -157,7 +155,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
157155 }
158156 catch ( e )
159157 {
160- if ( ! ( e instanceof HttpError ) || e . status !== 404 ) {
158+ if ( ! ( e instanceof HttpError ) || e . status !== 404 ) {
161159 Logger . error ( `Failed to get codeObject ${ codeObject . id } errors` , e ) ;
162160 const html = HtmlHelper . getErrorMessage ( "Failed to fetch errors from Digma server.\nSee Output window from more info." ) ;
163161 this . _channel . publish ( new UiMessage . Set . ErrorsList ( html ) ) ;
@@ -171,7 +169,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
171169
172170 const codeObjectGroupEnv = new CodeObjectGroupEnvironments ( this . _webViewUris , this . _workspaceState ) ;
173171
174- if ( errors . length == 0 ) {
172+ if ( errors . length == 0 ) {
175173 let html = codeObjectGroupEnv . getUsageHtml ( undefined , undefined , usageResults ) ;
176174 html += `${ HtmlHelper . getInfoMessage ( "Great news! No errors recorded here yet. Fingers crossed..." ) } ` ;
177175 this . _channel . publish ( new UiMessage . Set . ErrorsList ( html ) ) ;
@@ -188,10 +186,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
188186 }
189187 }
190188
191-
192-
193-
194- private async onShowErrorDetailsEvent ( e : UiMessage . Get . ErrorDetails ) {
189+ private async onShowErrorDetailsEvent ( e : UiMessage . Get . ErrorDetails ) {
195190 if ( ! e . errorSourceUID ) {
196191 return ;
197192 }
@@ -210,15 +205,15 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
210205 const stackViewModel = viewModels . firstOrDefault ( ) ;
211206 this . _stackViewModel = stackViewModel ;
212207 this . _stackViewModels = viewModels ;
213- let html = ErrorsHtmlBuilder . buildErrorDetails ( errorDetails , viewModels ) ;
208+ const html = ErrorsHtmlBuilder . buildErrorDetails ( errorDetails , viewModels ) ;
214209 this . _overlay . show ( html , this . errorOverlayId ) ;
215210 this . navigateErrorFlow ( ) ;
216211 this . updateEditorDecorations ( stackViewModel ) ;
217212 }
218213
219214 private onOverlayVisibilityChanged ( e : UiMessage . Notify . OverlayVisibilityChanged )
220215 {
221- if ( e . visible !== undefined && e . id === this . errorOverlayId ) { //error overlay visibility changed
216+ if ( e . visible !== undefined && e . id === this . errorOverlayId ) { //error overlay visibility changed
222217 this . _errorFlowParamDecorator . enabled = e . visible ;
223218 }
224219 }
@@ -284,7 +279,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
284279 moduleName,
285280 functionName,
286281 lineNumber,
287- executedCode : executedCode ,
282+ executedCode,
288283 codeObjectId,
289284 parameters,
290285 repeat,
@@ -311,7 +306,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
311306 moduleName,
312307 functionName,
313308 lineNumber,
314- executedCode : executedCode ,
309+ executedCode,
315310 codeObjectId,
316311 repeat,
317312 workspaceUri,
@@ -334,7 +329,7 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
334329 lastInstanceCommitId : sourceFlow . lastInstanceCommitId ,
335330 affectedSpanPaths : [ ] ,
336331 exceptionType : '' ,
337- summary : undefined
332+ summary : undefined ,
338333 } ;
339334 viewModels . push ( viewModel ) ;
340335 }
@@ -365,24 +360,27 @@ export class ErrorsViewTab implements ICodeAnalyticsViewTab
365360 if ( ! docInfo ) {
366361 return ;
367362 }
368-
363+
369364 const methodInfo = docInfo ?. methods . firstOrDefault ( ( m ) => m . range . contains ( position ) ) ;
370- if ( ! methodInfo ) {
365+ if ( ! methodInfo ) {
371366 return ;
372367 }
373368
374- const codeObject = < CodeObjectInfo > {
375- id : methodInfo . symbol . id ,
376- methodName : methodInfo . displayName
369+ const codeObject = < CodeObjectInfo > {
370+ id : methodInfo . symbol . id ,
371+ methodName : methodInfo . displayName ,
377372 } ;
378373 return codeObject ;
379374 }
380375
381- private async onWorkspaceOnlyChanged ( value ?: boolean ) {
382- if ( value != undefined )
376+ private async onWorkspaceOnlyChanged ( value ?: boolean ) {
377+ if ( value != undefined ) {
383378 await Settings . hideFramesOutsideWorkspace . set ( value ) ;
379+ }
384380 }
381+
385382 private errorOverlayId = "errorOverlay" ;
383+
386384 private async goToFileAndLineById ( frameId ?: number ) {
387385 const frame = this . _stackViewModel ?. stacks
388386 . flatMap ( s => s . frames )
0 commit comments