@@ -546,7 +546,6 @@ pub fn begin_unwind(msg: *c_char, file: *c_char, line: size_t) -> ! {
546
546
use rt:: in_green_task_context;
547
547
use rt:: task:: Task ;
548
548
use rt:: local:: Local ;
549
- use rt:: logging:: Logger ;
550
549
use str:: Str ;
551
550
use c_str:: CString ;
552
551
use unstable:: intrinsics;
@@ -573,16 +572,19 @@ pub fn begin_unwind(msg: *c_char, file: *c_char, line: size_t) -> ! {
573
572
// have been failing due to a lack of memory in the first place...
574
573
let task: * mut Task = Local :: unsafe_borrow ( ) ;
575
574
let n = ( * task) . name . as_ref ( ) . map ( |n| n. as_slice ( ) ) . unwrap_or ( "<unnamed>" ) ;
575
+
576
+ // XXX: this should no get forcibly printed to the console, this should
577
+ // either be sent to the parent task (ideally), or get printed to
578
+ // the task's logger. Right now the logger is actually a uvio
579
+ // instance, which uses unkillable blocks internally for various
580
+ // reasons. This will cause serious trouble if the task is failing
581
+ // due to mismanagment of its own kill flag, so calling our own
582
+ // logger in its current state is a bit of a problem.
576
583
match file. as_str ( ) {
577
584
Some ( file) => {
578
- format_args ! ( |args| { ( * task) . logger. log( args) } ,
579
- "task '{}' failed at '{}', {}:{}" ,
580
- n, msg, file, line) ;
581
- }
582
- None => {
583
- format_args ! ( |args| { ( * task) . logger. log( args) } ,
584
- "task '{}' failed at '{}'" , n, msg) ;
585
+ rterrln ! ( "task '{}' failed at '{}', {}:{}" , n, msg, file, line) ;
585
586
}
587
+ None => rterrln ! ( "task '{}' failed at '{}'" , n, msg) ,
586
588
}
587
589
if ( * task) . unwinder . unwinding {
588
590
rtabort ! ( "unwinding again" ) ;
0 commit comments