unified error handling system
This commit is contained in:
1
app/views/legacy/tags.json.erb
Normal file
1
app/views/legacy/tags.json.erb
Normal file
@@ -0,0 +1 @@
|
||||
[<%= @tags.map {|x| x.to_legacy_json}.join(", ").html_safe %>]
|
||||
@@ -1 +0,0 @@
|
||||
{success: false, message: "<%= @exception.to_s %>"}
|
||||
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<result success="false"><%= @exception.to_s %></result>
|
||||
0
app/views/static/error.atom.erb
Normal file
0
app/views/static/error.atom.erb
Normal file
5
app/views/static/error.json.erb
Normal file
5
app/views/static/error.json.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if @error_message %>
|
||||
{success: false, message: <%= raw @error_message.to_json %>}
|
||||
<% else %>
|
||||
{success: false, message: <%= raw @exception.to_s.to_json %>}
|
||||
<% end %>
|
||||
6
app/views/static/error.xml.erb
Normal file
6
app/views/static/error.xml.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<% if @error_message %>
|
||||
<result success="false"><%= @error_message %></result>
|
||||
<% else %>
|
||||
<result success="false"><%= @exception.to_s %></result>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user