Avoid calling ANY.print, prefer io.error.put_string

Fixed obsolete calls.
This commit is contained in:
Jocelyn Fiat
2012-12-20 18:32:56 +01:00
parent d46fbeaedd
commit a362e7d9c6
6 changed files with 21 additions and 17 deletions

View File

@@ -107,7 +107,7 @@ feature -- Server
create {WGI_NINO_HANDLER} l_http_handler.make_with_callback (server, Current) create {WGI_NINO_HANDLER} l_http_handler.make_with_callback (server, Current)
if configuration.is_verbose then if configuration.is_verbose then
if attached base as l_base then if attached base as l_base then
print ("Base=" + l_base + "%N") io.error.put_string ("Base=" + l_base + "%N")
end end
end end
server.setup (l_http_handler) server.setup (l_http_handler)

View File

@@ -187,7 +187,7 @@ feature {NONE} -- Parser
l_input: like input l_input: like input
do do
debug ("wgi") debug ("wgi")
print (" Read chunk data ("+ last_chunk_size.out +") %N") io.error.put_string (" Read chunk data ("+ last_chunk_size.out +") %N")
end end
l_input := input l_input := input
l_input.read_string (last_chunk_size) l_input.read_string (last_chunk_size)
@@ -207,7 +207,7 @@ feature {NONE} -- Parser
l_input: like input l_input: like input
do do
debug ("wgi") debug ("wgi")
print (" Read chunk size: ") io.error.put_string (" Read chunk size: ")
end end
l_input := input l_input := input
@@ -218,7 +218,7 @@ feature {NONE} -- Parser
loop loop
c := l_input.last_character c := l_input.last_character
debug ("wgi") debug ("wgi")
print (c.out) io.error.put_string (c.out)
end end
inspect c inspect c
when '%R' then when '%R' then
@@ -247,7 +247,7 @@ feature {NONE} -- Parser
tmp_hex_chunk_size.wipe_out tmp_hex_chunk_size.wipe_out
debug ("wgi") debug ("wgi")
print ("%N Chunk size = " + last_chunk_size.out + "%N") io.error.put_string ("%N Chunk size = " + last_chunk_size.out + "%N")
end end
end end
@@ -258,7 +258,7 @@ feature {NONE} -- Parser
do do
l_input := input l_input := input
debug ("wgi") debug ("wgi")
print (" Reading extension chunk ") io.error.put_string (" Reading extension chunk ")
end end
create s.make_empty create s.make_empty
from from
@@ -268,7 +268,7 @@ feature {NONE} -- Parser
l_input.last_character = '%R' l_input.last_character = '%R'
loop loop
debug ("wgi") debug ("wgi")
print (l_input.last_character) io.error.put_character (l_input.last_character)
end end
l_input.read_character l_input.read_character
s.append_character (l_input.last_character) s.append_character (l_input.last_character)
@@ -293,7 +293,7 @@ feature {NONE} -- Parser
l_input := input l_input := input
if not l_input.end_of_input then if not l_input.end_of_input then
debug ("wgi") debug ("wgi")
print (" Reading trailer ") io.error.put_string (" Reading trailer ")
end end
from from
l_line_size := 1 -- Dummy value /= 0 l_line_size := 1 -- Dummy value /= 0
@@ -309,7 +309,7 @@ feature {NONE} -- Parser
loop loop
l_line_size := l_line_size + 1 l_line_size := l_line_size + 1
debug ("wgi") debug ("wgi")
print (l_input.last_character) io.error.put_character (l_input.last_character)
end end
l_input.read_character l_input.read_character
s.append_character (l_input.last_character) s.append_character (l_input.last_character)

View File

@@ -88,8 +88,12 @@ feature -- Execution
conn.configuration.set_is_verbose (verbose) conn.configuration.set_is_verbose (verbose)
debug ("nino") debug ("nino")
if verbose then if verbose then
print ("Example: start a Nino web server on port " + port_number.out + io.error.put_string ("Launching Nino web server on port " + port_number.out)
", %Nand reply Hello World for any request such as http://localhost:" + port_number.out + "/" + base_url + "%N") if attached server_name as l_name then
io.error.put_string ("%N http://" + l_name + ":" + port_number.out + "/" + base_url + "%N")
else
io.error.put_string ("%N http://localhost:" + port_number.out + "/" + base_url + "%N")
end
end end
end end
if attached server_name as l_server_name then if attached server_name as l_server_name then

View File

@@ -22,10 +22,10 @@ feature {NONE} -- Initialization
default_create default_create
do do
Precursor Precursor
create on_router_actions.make create on_router_actions
create on_item_actions.make create on_item_actions
create on_mapping_actions.make create on_mapping_actions
create on_handler_actions.make create on_handler_actions
end end
feature -- Actions feature -- Actions

View File

@@ -151,7 +151,7 @@ feature {NONE} -- Storage
build build
end end
rescue rescue
print ("ouch") io.error.put_string ("Error while loading Cookie session...!%N")
end end
build build

View File

@@ -52,7 +52,7 @@ feature -- Access
end end
rescue rescue
debug debug
print ("Error occurred in " + generator) io.error.put_string ("Error occurred in " + generator)
end end
end end