aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates/rescues/_source.erb
Commit message (Collapse)AuthorAgeFilesLines
* Add text template for source codeTijmen Brommet2015-11-031-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a request is made with AJAX and an error occurs, Rails will render a text-template for the exception instead of the HTML error page (#11960). The `.text.erb` variant of the `_source` template is currently missing, causing HTML to be rendered in the response. This commit adds the text template. To keep the page scannable we only only show the first three source extracts. Related to #14745. Before: ``` ~/testing-exceptions ᐅ curl 'http://localhost:3000/' -H 'X-Requested-With: XMLHttpRequest' RuntimeError in PostsController#index <div class="source " id="frame-source-0"> <div class="info"> Extracted source (around line <strong>#3</strong>): </div> <div class="data"> <table cellpadding="0" cellspacing="0" class="lines"> <tr> ``` After: ``` ~/testing-exceptions ᐅ curl 'http://localhost:3000/' -H 'X-Requested-With: XMLHttpRequest' RuntimeError in PostsController#index Extracted source (around line #3): *3 raise ```
* Rename #source_extract to #source_extracts in ExceptionWrapperGenadi Samokovarov2014-11-161-5/+5
| | | | | It returns multiple source extracts since 1ed264bc. Also cleaned its result structure, as we no longer need the file in a code extract.
* Don't let #{application,framework,full}_trace be nilGenadi Samokovarov2014-11-161-20/+18
| | | | | | Those three can be nil when exception backtrace is nil. This happens and that forced a couple of nil guards in the code. I'm proposing to make those always return an array, even on nil backtrace.
* Show the user’s application in the source window and select the correct ↵Byron Bischoff2014-10-231-1/+1
| | | | trace list, closes #17312
* Use Hash#each_key instead of Hash#keys.eachErik Michaels-Ober2014-09-291-1/+1
| | | | | | Hash#keys.each allocates an array of keys; Hash#each_key iterates through the keys without allocating a new array. This is the reason why Hash#each_key exists.
* Retrieve source code for the entire stack traceRyan Dao2014-08-081-18/+22
| | | | | | Provide the ability to extract the source code of the entire exception stack trace, not just the frame raising the error. This improves debugging capability of the error page, especially for framework-related errors.
* Styling for exception pageGuillermo Iguaran2012-12-311-4/+21
|
* Add source extract to detailed exception pageGuillermo Iguaran2012-12-311-0/+8