Files
snapd/snap
Michael Vogt 3ec4381aa2 snap: provide more error context in NotSnapError (#12474)
When a NotSnapError is returned right now there is no context
provided what went wrong. This makes debugging issues difficult
when the user just reports:
```
2022-11-23T14:47:57Z ERROR "/var/lib/snapd/snaps/.local-install-130452292" is not a snap or snapdir
```

This commit creates a constructor `snap.NewNotSnapErrorWithContext()`
that provides some context like:
```
cannot process snap or snapdir: open non-existing-file: no such file or directory
cannot process snap or snapdir: directory "empty-dir" is empty
cannot process snap or snapdir: directory "invalid-dir" is invalid
cannot process snap or snapdir: file "not-snap" is invalid header [110 111 116 45 97 45 115 110 97 112])
```
2023-01-19 16:45:17 +01:00
..
2022-04-04 17:28:07 +02:00
2021-11-29 15:07:36 +00:00
2021-08-26 18:24:02 +01:00
2021-12-03 11:51:50 +00:00
2016-07-27 19:34:20 +02:00