From 74149c3cb46f9d7bc323935fa9b2b02fa0950687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yngve=20H=C3=B8iseth?= Date: Fri, 31 May 2019 13:46:10 +0200 Subject: [PATCH 1/2] Document exceptions thrown by routes() --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 869b56c..174656e 100644 --- a/README.md +++ b/README.md @@ -164,4 +164,4 @@ The `route()` method takes a single string for the route ID ("main" in this case To access all routes, or to search for a route that has no ID, the `routes()` method returns an dictionary of routes keyed by their URL. That mirrors the structure of the `PLATFORM_ROUTES` environment variable. -If called in the build phase an exception is thrown. +If called in the build phase, a `BuildTimeVariableAccessException` is thrown. If called in a non-platform environment or in a worker environment, a `NotValidPlatformException` is thrown. From 255f3802ae2fcce4abf10aecfe66472848e45754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yngve=20H=C3=B8iseth?= Date: Fri, 31 May 2019 13:51:57 +0200 Subject: [PATCH 2/2] Simplify routes() error documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 174656e..8d11e7a 100644 --- a/README.md +++ b/README.md @@ -164,4 +164,4 @@ The `route()` method takes a single string for the route ID ("main" in this case To access all routes, or to search for a route that has no ID, the `routes()` method returns an dictionary of routes keyed by their URL. That mirrors the structure of the `PLATFORM_ROUTES` environment variable. -If called in the build phase, a `BuildTimeVariableAccessException` is thrown. If called in a non-platform environment or in a worker environment, a `NotValidPlatformException` is thrown. +If called in the build phase, in a non-Platform.sh environment or in a worker environment, a `RuntimeError` is raised.