throw a better error on browser restart failure
This commit is contained in:
parent
3fee69a556
commit
4b63189917
1 changed files with 1 additions and 2 deletions
|
|
@ -332,8 +332,7 @@ func (w *watcher) compileLoop(ctx context.Context) error {
|
||||||
if filepath.Ext(w.outputPath) == ".png" && !w.pw.Browser.IsConnected() {
|
if filepath.Ext(w.outputPath) == ".png" && !w.pw.Browser.IsConnected() {
|
||||||
newPW, err := w.pw.RestartBrowser()
|
newPW, err := w.pw.RestartBrowser()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.ms.Log.Error.Printf("failed to refresh Playwright browser")
|
return fmt.Errorf("png exporter has disconnected")
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
w.pw = newPW
|
w.pw = newPW
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue