* [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup
@ 2008-04-03 14:16 Nicolas Pouillard
2008-04-06 11:06 ` Giorgio Lando
2008-04-21 8:01 ` Nicolas Pouillard
0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2008-04-03 14:16 UTC (permalink / raw)
More precisely new destinations are:
- ~/.sup/exception-log.txt
- ~/.sup/unable-to-decode.txt
This patch avoid some kind of pollution.
---
bin/sup | 4 ++--
lib/sup/message.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/sup b/bin/sup
index 0d34215..a7623de 100644
--- a/bin/sup
+++ b/bin/sup
@@ -327,7 +327,7 @@ ensure
end
unless $exceptions.empty?
- File.open("sup-exception-log.txt", "w") do |f|
+ File.open(File.join(BASE_DIR, "exception-log.txt"), "w") do |f|
$exceptions.each do |e, name|
f.puts "--- #{e.class.name} from thread: #{name}"
f.puts e.message, e.backtrace
@@ -337,7 +337,7 @@ unless $exceptions.empty?
----------------------------------------------------------------
I'm very sorry. It seems that an error occurred in Sup. Please
accept my sincere apologies. If you don't mind, please send the
-contents of sup-exception-log.txt and a brief report of the
+contents of ~/.sup/exception-log.txt and a brief report of the
circumstances to sup-talk at rubyforge dot orgs so that I might
address this problem. Thank you!
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 6a2a9c4..249b6c6 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -423,7 +423,7 @@ private
Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2]
rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e
Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}"
- File.open("sup-unable-to-decode.txt", "w") { |f| f.write body }
+ File.open(File.join(BASE_DIR,"unable-to-decode.txt"), "w") { |f| f.write body }
body
end
end
--
1.5.3.1.109.gacd69
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup
2008-04-03 14:16 [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup Nicolas Pouillard
@ 2008-04-06 11:06 ` Giorgio Lando
2008-04-21 8:01 ` Nicolas Pouillard
1 sibling, 0 replies; 5+ messages in thread
From: Giorgio Lando @ 2008-04-06 11:06 UTC (permalink / raw)
Excerpts from Nicolas Pouillard's message of Thu Apr 03 16:16:19 +0200 2008:
> More precisely new destinations are:
> - ~/.sup/exception-log.txt
> - ~/.sup/unable-to-decode.txt
> This patch avoid some kind of pollution.
I really enjoy this patch, my home folder is now cleaner! Thanks
--
Giorgio Lando <patroclo7 at gmail dot com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup
2008-04-03 14:16 [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup Nicolas Pouillard
2008-04-06 11:06 ` Giorgio Lando
@ 2008-04-21 8:01 ` Nicolas Pouillard
2008-04-23 1:43 ` William Morgan
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2008-04-21 8:01 UTC (permalink / raw)
What about applying this patch?
Excerpts from Nicolas Pouillard's message of Thu Apr 03 16:16:19 +0200 2008:
> More precisely new destinations are:
> - ~/.sup/exception-log.txt
> - ~/.sup/unable-to-decode.txt
> This patch avoid some kind of pollution.
> ---
> bin/sup | 4 ++--
> lib/sup/message.rb | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/bin/sup b/bin/sup
> index 0d34215..a7623de 100644
> --- a/bin/sup
> +++ b/bin/sup
> @@ -327,7 +327,7 @@ ensure
> end
>
> unless $exceptions.empty?
> - File.open("sup-exception-log.txt", "w") do |f|
> + File.open(File.join(BASE_DIR, "exception-log.txt"), "w") do |f|
> $exceptions.each do |e, name|
> f.puts "--- #{e.class.name} from thread: #{name}"
> f.puts e.message, e.backtrace
> @@ -337,7 +337,7 @@ unless $exceptions.empty?
> ----------------------------------------------------------------
> I'm very sorry. It seems that an error occurred in Sup. Please
> accept my sincere apologies. If you don't mind, please send the
> -contents of sup-exception-log.txt and a brief report of the
> +contents of ~/.sup/exception-log.txt and a brief report of the
> circumstances to sup-talk at rubyforge dot orgs so that I might
> address this problem. Thank you!
>
> diff --git a/lib/sup/message.rb b/lib/sup/message.rb
> index 6a2a9c4..249b6c6 100644
> --- a/lib/sup/message.rb
> +++ b/lib/sup/message.rb
> @@ -423,7 +423,7 @@ private
> Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2]
> rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e
> Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}"
> - File.open("sup-unable-to-decode.txt", "w") { |f| f.write body }
> + File.open(File.join(BASE_DIR,"unable-to-decode.txt"), "w") { |f| f.write body }
> body
> end
> end
--
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080421/e75f4850/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup
2008-04-21 8:01 ` Nicolas Pouillard
@ 2008-04-23 1:43 ` William Morgan
2008-04-23 8:59 ` Nicolas Pouillard
0 siblings, 1 reply; 5+ messages in thread
From: William Morgan @ 2008-04-23 1:43 UTC (permalink / raw)
Reformatted excerpts from nicolas.pouillard's message of 2008-04-21:
> What about applying this patch?
Applied directly to master, and sorry for the delay.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup
2008-04-23 1:43 ` William Morgan
@ 2008-04-23 8:59 ` Nicolas Pouillard
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2008-04-23 8:59 UTC (permalink / raw)
Excerpts from William Morgan's message of Wed Apr 23 03:43:17 +0200 2008:
> Reformatted excerpts from nicolas.pouillard's message of 2008-04-21:
> > What about applying this patch?
>
> Applied directly to master, and sorry for the delay.
No problem.
--
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080423/3e0a19cf/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-23 8:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-03 14:16 [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup Nicolas Pouillard
2008-04-06 11:06 ` Giorgio Lando
2008-04-21 8:01 ` Nicolas Pouillard
2008-04-23 1:43 ` William Morgan
2008-04-23 8:59 ` Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox