1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/player/javascript
Avi Halachmi (:avih) 6123e97e31 js: custom init (~~/.init.js): fail loudly on errors
Previously, loading ~~/.init.js was inside a try block, in order to
quietly ignore errors if the file doesn't exist.

However, that also prevented any real errors from showing up even when
the file does exist, and the script continued as if everything is OK,
while in fact the custom init script didn't complete correctly.

Now we first check if the file exists, and then load it without
try/catch, so that any error shows up normally (and abort the script).
2021-09-30 18:28:28 +03:00
..
defaults.js js: custom init (~~/.init.js): fail loudly on errors 2021-09-30 18:28:28 +03:00