problem

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package problem names the coded errors that notesd records in the local journal, and the small interface through which its packages record them (docs/adr/0036-notesd-and-the-app-record-problems-in-the-journal.md).

notesd makes 1 recorder of github.com/frostyard/std/problems in main and passes it to each package in its Config as a Recorder. A package never imports the journal writer itself, and a nil Recorder records nothing. Only the code is the contract: the error's text stays on the host.

Index

Constants

View Source
const (
	// StoreMigrateFailed: the database cannot be opened and migrated: its
	// first transaction or a migration fails, or its schema is not this
	// notesd's (store.Open's *store.MigrateError, recorded by notesd).
	StoreMigrateFailed = "store.migrate_failed"
	// MergeFailed: the merge library panics on a merge of the vault
	// (vault.guardMerge).
	MergeFailed = "merge.failed"
	// VaultWriteFailed: a write to the vault fails for a reason that is not
	// the client's: the blob store, the staged file, its rename, or the
	// index transaction after the rename (vault.Vault.writeFailed).
	VaultWriteFailed = "vault.write_failed"
	// WatchOverflowRescan: the kernel's inotify queue overflowed, so the
	// vault is scanned again (vault.watcher.watchError).
	WatchOverflowRescan = "watch.overflow_rescan"
	// SyncProtocolError: a device's sync session with a hub ended on a
	// protocol fault (syncer.protocolFault).
	SyncProtocolError = "sync.protocol_error"
)

The codes notesd records. Each is recorded at 1 place.

Variables

This section is empty.

Functions

func Record

func Record(r Recorder, code string, err error)

Record records code with err on r. A nil r records nothing.

Types

type Recorder

type Recorder interface {
	Error(code string, err error)
}

Recorder records a coded error. *problems.Recorder of github.com/frostyard/std implements it.

Directories

Path Synopsis
Package problemtest helps tests of notesd's problem records: a fake problem.Recorder, and a datagram socket that stands in for the journal, whose records are decoded and checked with github.com/frostyard/std/problems.
Package problemtest helps tests of notesd's problem records: a fake problem.Recorder, and a datagram socket that stands in for the journal, whose records are decoded and checked with github.com/frostyard/std/problems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL