Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Sharagoz/rails_exception_handler
- Loading branch information
Showing
5 changed files
with
143 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class ErrorMailer < ApplicationMailer | ||
|
||
# Subject can be set in your I18n file at config/locales/en.yml | ||
# with the following lookup: | ||
# | ||
# en.error_mailer.send_error_mail_to_admin.subject | ||
# | ||
def send_error_mail_to_admin(info,email) | ||
@info = JSON.parse(info) | ||
mail(to: email, subject: 'An error occured on your application') | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<p> | ||
Hi boss, | ||
</p> | ||
<p> | ||
an error occured at <%= @info["created_at"] %> | ||
</p> | ||
|
||
|
||
<p> | ||
TARGET URL <br/> | ||
<%= @info["target_url"] %> | ||
</p> | ||
|
||
|
||
<% unless @info["referer_url"].blank? %> | ||
<p> | ||
REFERER URL <br/> | ||
<%= @info["referer_url"] %> | ||
</p> | ||
<%end%> | ||
|
||
<p> | ||
PARAMETERS <br/> | ||
<%= @info["params"] %> | ||
</p> | ||
|
||
<p> | ||
USER AGENT <br/> | ||
<%= @info["user_agent"] %> | ||
</p> | ||
|
||
<p> | ||
USER INFORMATION <br/> | ||
<%= @info["user_info"] %> | ||
</p> | ||
|
||
<p> | ||
CLASS NAME<br/> | ||
<%= @info["class_name"] %> | ||
|
||
</p> | ||
|
||
<% unless @info["message"].blank? %> | ||
<p> | ||
MESSAGE<br/> | ||
<%= @info["message"] %> | ||
</p> | ||
<%end%> | ||
|
||
<p> | ||
TRACE <br/> | ||
<%= @info["trace"] %> | ||
</p> | ||
|
||
|
||
<% unless @info["doc_root"].blank? %> | ||
<p> | ||
DOC ROOT <br/> | ||
<%= @info["doc_root"] %> | ||
</p> | ||
<%end%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<p> | ||
Hi boss, | ||
</p> | ||
<p> | ||
an error occured at <%= @info["created_at"] %> | ||
</p> | ||
|
||
|
||
<p> | ||
TARGET URL <br/> | ||
<%= @info["target_url"] %> | ||
</p> | ||
|
||
|
||
<% unless @info["referer_url"].blank? %> | ||
<p> | ||
REFERER URL <br/> | ||
<%= @info["referer_url"] %> | ||
</p> | ||
<%end%> | ||
|
||
<p> | ||
PARAMETERS <br/> | ||
<%= @info["params"] %> | ||
</p> | ||
|
||
<p> | ||
USER AGENT <br/> | ||
<%= @info["user_agent"] %> | ||
</p> | ||
|
||
<p> | ||
USER INFORMATION <br/> | ||
<%= @info["user_info"] %> | ||
</p> | ||
|
||
<p> | ||
CLASS NAME<br/> | ||
<%= @info["class_name"] %> | ||
|
||
</p> | ||
|
||
<% unless @info["message"].blank? %> | ||
<p> | ||
MESSAGE<br/> | ||
<%= @info["message"] %> | ||
</p> | ||
<%end%> | ||
|
||
<p> | ||
TRACE <br/> | ||
<%= @info["trace"] %> | ||
</p> | ||
|
||
|
||
<% unless @info["doc_root"].blank? %> | ||
<p> | ||
DOC ROOT <br/> | ||
<%= @info["doc_root"] %> | ||
</p> | ||
<%end%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters