File tree 2 files changed +11
-1
lines changed
src/org/klesun/deep_js_completion/entry
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ object PathStrGoToDecl {
20
20
.flatMap(f => Option (f.getContainingDirectory))
21
21
.flatMap(f => Option (f.getVirtualFile))
22
22
.map(f => f.getPath + " /" + relPath + (if (relPath.matches(" .*\\ .[a-zA-Z0-9]+$" )) " " else " .js" ))
23
- .flatMap(fullPath => Option (LocalFileSystem .getInstance.findFileByPath(fullPath)))
23
+ .flatMap(fullPath => {
24
+ try {
25
+ Option (LocalFileSystem .getInstance.findFileByPath(fullPath))
26
+ } catch {
27
+ case exc : Throwable => None
28
+ }
29
+ })
24
30
.flatMap(f => Option (PsiManager .getInstance(caretFile.getProject).findFile(f)))
25
31
}
26
32
Original file line number Diff line number Diff line change 1
1
2
+ let SomeInvalidPathModule = require ( './/../asd.js' ) ;
2
3
let SomeCjsModule = require ( './SomeCjsModule.js' ) ;
3
4
5
+ // tried to reproduce #13, did not succeed, but will add the try-catch nevertheless
6
+ SomeInvalidPathModule . asd ;
7
+
4
8
SomeCjsModule ( { } ) . runInputCmd ( '*R' ) . then ( resp => {
5
9
resp . o ;
6
10
} ) ;
You can’t perform that action at this time.
0 commit comments