Class: ChefServerSlice::Exceptions
- Inherits:
-
Application
- Object
- Merb::Controller
- Application
- ChefServerSlice::Exceptions
- Defined in:
- app/controllers/exceptions.rb
Overview
- Author
-
Adam Jacob (<[email protected]>)
- Author
-
Christopher Brown (<[email protected]>)
- Copyright
-
Copyright © 2008 Opscode, Inc.
- License
-
Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Method Summary collapse
Methods inherited from Application
#absolute_slice_url, #access_denied, #authorized_node, #escape_node_id, #expand_cookbook_deps, #fix_up_node_id, #get_available_recipes, #load_all_files, #load_cookbook_segment, #login_required, #redirect_back_or_default, #segment_files, #specific_cookbooks, #store_location
Instance Method Details
#standard_error ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/controllers/exceptions.rb', line 24 def standard_error Merb.logger.warn(request.content_type) if request.accept =~ /application\/json/ display({ "error" => request.exceptions }) else raise request.exceptions.first end end |