mirror of
https://github.com/github/codeql.git
synced 2026-07-05 03:25:31 +02:00
22 lines
420 B
Ruby
22 lines
420 B
Ruby
class FooController < ApplicationController
|
|
|
|
def show
|
|
something_that_might_fail()
|
|
rescue => e
|
|
render body: e.backtrace, content_type: "text/plain" # $ Alert
|
|
end
|
|
|
|
|
|
def show2
|
|
bt = caller() # $ Source
|
|
render body: bt, content_type: "text/plain" # $ Alert
|
|
end
|
|
|
|
def show3
|
|
not_a_method()
|
|
rescue NoMethodError => e
|
|
render body: e.backtrace, content_type: "text/plain" # $ Alert
|
|
end
|
|
|
|
end
|