Closed birdofpreyru closed 7 months ago
The content of this handled should be wrapped into try / catch block, with empty catch just ignoring possible rejections if server has any attached state listeners — in that case any error will be forwarded to those listeners by .start() / .stop(), and we assume the consumer handles errors there. https://github.com/birdofpreyru/react-native-static-server/blob/38a89289ed054f781179603cd6409e998e81be25/src/index.tsx#L412-L415
try / catch
catch
.start()
.stop()
If no listeners connected, we need to somehow enhance error messages, to make it clear that it is related to the auto server restart.
The content of this handled should be wrapped into
try / catch
block, with emptycatch
just ignoring possible rejections if server has any attached state listeners — in that case any error will be forwarded to those listeners by.start()
/.stop()
, and we assume the consumer handles errors there. https://github.com/birdofpreyru/react-native-static-server/blob/38a89289ed054f781179603cd6409e998e81be25/src/index.tsx#L412-L415If no listeners connected, we need to somehow enhance error messages, to make it clear that it is related to the auto server restart.