Debugging

P

Paatsch, Bernd

------_=_NextPart_001_01C62E98.D9AC3684
Content-Type: text/plain

Hello,

Is it possible in ruby to generate during runtime in case of an error a log
file containing the name of the file, the line number and the line of the
code? If so how, or where to find information about it?

Thanks,
Bernd


------_=_NextPart_001_01C62E98.D9AC3684--
 
J

James Edward Gray II

Hello,

Is it possible in ruby to generate during runtime in case of an
error a log
file containing the name of the file, the line number and the line
of the
code? If so how, or where to find information about it?

Well, you could wrap your whole code in:

begin
# your code goes here...
rescue Exception => error
# write out to a file here, using method of error for info...
end

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,663
Latest member
josh5959

Latest Threads

Top