Promise에서 catch 를 처리할 경우 throw new Error를 한다고 해도 sentry로 에러가 송신되지 않는다.
Promise에서 catch 를 통해 reject 핸들러가 동작해서 "처리" 했다고 판단되기 때문.
따라서 이 경우, 아래와 같이 Sentry.Native.captureException
를 통해 에러를 직접 보내야 한다.
import * as Sentry from "sentry-expo";
...
FileSystem.deleteAsync(...)
.then(() => {
...
})
.catch((e) => {
Sentry.Native.captureException(new Error(`Fali delete a room: ${e}`));
});