Skip to content

missing input files generate a panic #16

@sje30

Description

@sje30

Hi,
If /tmp/tst is missing (I had created /tmp/test by mistake, following your README), I get a panic. The panic message explains the error, but then it is followed by a long
backtrace (truncated below).

./microfts input -file /tmp/bubba /tmp/tst
panic: Error: stat /tmp/tst: no such file or directory, args: [/tmp/bubba /tmp/tst]

goroutine 1 [running]:
main.check(0x59fe60, 0xc00007a720)
        /home/bill/work/microfts/fulltext.go:205 +0x150
main.(*lmdbConfigStruct).openInputFile(0x686980, 0x7fff9d4de550, 0x8, 0xc00013baa0, 0x4e740c, 0x7f9cec003ffb, 0x4)
        /home/bill/work/microfts/fts-lmdb.go:535 +0x79
main.(*lmdbConfigStruct).indexLines(0x686980, 0x7fff9d4de550, 0x8)
        /home/bill/work/microfts/fts-lmdb.go:579 +0x5d
main.(*lmdbConfigStruct).index(0x686980, 0x7fff9d4de550, 0x8)
        /home/bill/work/microfts/fts-lmdb.go:529 +0x6f
main.cmdInput.func1()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions