@@ -19,7 +19,7 @@ import {
1919 isLineColumnLoc ,
2020 tryGetResolvableLocation ,
2121} from "../../pure/bqrs-utils" ;
22- import { ViewSourceFileMsg } from "../../pure/interface-types " ;
22+ import { getErrorMessage } from "../../pure/helpers-pure " ;
2323import { Logger } from "../../common" ;
2424import { DatabaseItem } from "./database-item" ;
2525import { DatabaseManager } from "./database-manager" ;
@@ -139,27 +139,22 @@ export async function showLocation(location?: Location) {
139139}
140140
141141export async function jumpToLocation (
142- msg : ViewSourceFileMsg ,
142+ databaseUri : string ,
143+ loc : ResolvableLocationValue ,
143144 databaseManager : DatabaseManager ,
144145 logger : Logger ,
145146) {
146- const databaseItem = databaseManager . findDatabaseItem (
147- Uri . parse ( msg . databaseUri ) ,
148- ) ;
147+ const databaseItem = databaseManager . findDatabaseItem ( Uri . parse ( databaseUri ) ) ;
149148 if ( databaseItem !== undefined ) {
150149 try {
151- await showResolvableLocation ( msg . loc , databaseItem ) ;
150+ await showResolvableLocation ( loc , databaseItem ) ;
152151 } catch ( e ) {
153- if ( e instanceof Error ) {
154- if ( e . message . match ( / F i l e n o t f o u n d / ) ) {
155- void Window . showErrorMessage (
156- "Original file of this result is not in the database's source archive." ,
157- ) ;
158- } else {
159- void logger . log ( `Unable to handleMsgFromView: ${ e . message } ` ) ;
160- }
152+ if ( e instanceof Error && e . message . match ( / F i l e n o t f o u n d / ) ) {
153+ void Window . showErrorMessage (
154+ "Original file of this result is not in the database's source archive." ,
155+ ) ;
161156 } else {
162- void logger . log ( `Unable to handleMsgFromView : ${ e } ` ) ;
157+ void logger . log ( `Unable to jump to location : ${ getErrorMessage ( e ) } ` ) ;
163158 }
164159 }
165160 }
0 commit comments