Skip to content

Commit

Permalink
fix: add error trace
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Jan 24, 2024
1 parent 8765c84 commit cad19e2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/adapter/GitAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export default class GitAdapter {
const bufferData = await this.getBufferFromBlob(blob)
return bufferData?.toString(UTF8_ENCODING) ?? ''
} catch (error) {
console.log(error)
console.log(forRef)
const err = error as Error
if (err.name === 'NotFoundError') {
return ''
Expand Down
2 changes: 2 additions & 0 deletions src/post-processor/postProcessorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default class PostProcessorManager {
try {
await postProcessor.process()
} catch (error) {
console.log(error)
console.log(postProcessor)
if (error instanceof Error) {
this.work.warnings.push(error)
}
Expand Down
2 changes: 2 additions & 0 deletions src/service/standardHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export default class StandardHandler {
break
}
} catch (error) {
console.log(error)
console.log(error)
if (error instanceof Error) {
error.message = `${this.line}: ${error.message}`
this.warnings.push(error)
Expand Down
6 changes: 5 additions & 1 deletion src/utils/fsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const copyFiles = async (config: Config, src: string) => {
await outputFile(treatPathSep(dst), file.content)
copiedFiles.add(dst)
}
} catch {
} catch (error) {
console.log(error)
console.log(src)
/* empty */
}
}
Expand All @@ -41,6 +43,8 @@ export const readPathFromGit = async (forRef: FileGitRef, config: Config) => {
const gitAdapter = GitAdapter.getInstance(config)
utf8Data = await gitAdapter.getStringContent(forRef)
} catch (error) {
console.log(error)
console.log(forRef)

Check warning on line 47 in src/utils/fsHelper.ts

View check run for this annotation

Codecov / codecov/patch

src/utils/fsHelper.ts#L46-L47

Added lines #L46 - L47 were not covered by tests
/* empty */
}
return utf8Data
Expand Down

0 comments on commit cad19e2

Please sign in to comment.