Removed shared_error from CMS_API
Added Missing theme and Missing tempalte classes. Updated CMS_RESPONSE to handle missing template and send a 503 status code with a raw response.
This commit is contained in:
@@ -8,8 +8,6 @@ class
|
||||
|
||||
inherit
|
||||
|
||||
SHARED_ERROR
|
||||
|
||||
REFACTORING_HELPER
|
||||
|
||||
create
|
||||
@@ -23,7 +21,6 @@ feature -- Initialize
|
||||
setup := a_setup
|
||||
create error_handler.make
|
||||
initialize
|
||||
set_successful
|
||||
ensure
|
||||
setup_set: setup = a_setup
|
||||
error_handler_set: not error_handler.has_error
|
||||
|
||||
@@ -20,6 +20,7 @@ feature -- Basic operations
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute the filter
|
||||
do
|
||||
fixme ("Check if it's ok to add new fetures CMS_API.has_error:BOOLEAN and CMS_API.error_description.")
|
||||
if not api.error_handler.has_error then
|
||||
log.write_information (generator + ".execute")
|
||||
execute_next (req, res)
|
||||
|
||||
@@ -740,8 +740,9 @@ feature -- Theme
|
||||
if l_info.engine.is_case_insensitive_equal_general ("smarty") then
|
||||
create {SMARTY_CMS_THEME} theme.make (setup, l_info)
|
||||
else
|
||||
to_implement ("Add a default SMARTY_CMS_THEME")
|
||||
create {SMARTY_CMS_THEME} theme.make (setup, l_info)
|
||||
create {MISSING_CMS_THEME} theme.make (setup)
|
||||
status_code := {HTTP_STATUS_CODE}.service_unavailable
|
||||
to_implement ("Check how to add the Retry-after, http://tools.ietf.org/html/rfc7231#section-6.6.4 and http://tools.ietf.org/html/rfc7231#section-7.1.3")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user