File
Blob: src/workerd/util/exception.h
| 1 | // Copyright (c) 2017-2022 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <kj/exception.h> |
| 8 | |
| 9 | namespace workerd { |
| 10 | |
| 11 | // NOTE: Constants in this file must match `src/rust/worker/exception.rs` |
| 12 | |
| 13 | // If an exception is thrown for exceeding CPU time limits, it will contain this detail. |
| 14 | constexpr kj::Exception::DetailTypeId CPU_LIMIT_DETAIL_ID = 0xfdcb787ba4240576ull; |
| 15 | // If an exception is thrown for exceeding memory limits, it will contain this detail. |
| 16 | constexpr kj::Exception::DetailTypeId MEMORY_LIMIT_DETAIL_ID = 0xbaf76dd7ce5bd8cfull; |
| 17 | // If an exception is thrown for worker killed before start, it will contain this detail. |
| 18 | const kj::Exception::DetailTypeId SCRIPT_KILLED_DETAIL_ID = 0xf8935d579c20da70; |
| 19 | |
| 20 | } // namespace workerd |