File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,13 +167,13 @@ export default class ExtendedTaskListsPlugin extends Plugin {
167167 let todoFile : TFile ;
168168 try {
169169 todoFile = await vault . create ( this . settings . todoFilename , "" ) ;
170- } catch ( _e ) {
170+ } catch ( e ) {
171171 const todoFileOrNull = vault . getAbstractFileByPath (
172172 this . settings . todoFilename ,
173173 ) ;
174174 if ( todoFileOrNull == null ) {
175175 throw new Error (
176- `Could not get or create the TODO file: ${ this . settings . todoFilename } ` ,
176+ `Could not get or create the TODO file: ${ this . settings . todoFilename } : ${ e } ` ,
177177 ) ;
178178 } else if ( ! ( todoFileOrNull instanceof TFile ) ) {
179179 throw new Error (
Original file line number Diff line number Diff line change @@ -37,14 +37,14 @@ class VaultFileService implements VaultFileService {
3737 if ( file instanceof TFile ) {
3838 return await this . vault . cachedRead ( file ) ;
3939 }
40- return Promise . reject ( "not a TFile" ) ;
40+ return Promise . reject ( new Error ( "not a TFile" ) ) ;
4141 }
4242
4343 async updateFile ( file : IFile , data : string ) : Promise < void > {
4444 if ( file instanceof TFile ) {
4545 await this . vault . modify ( file , data ) ;
4646 }
47- return Promise . reject ( "not a TFile" ) ;
47+ return Promise . reject ( new Error ( "not a TFile" ) ) ;
4848 }
4949
5050 async checkExists ( filepath : string ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments