[m-rev.] diff: implement make_err_msg on IL backend

Peter Ross peter.ross at miscrit.be
Sat Dec 15 03:06:03 AEDT 2001


Hi,


===================================================================


Estimated hours taken: 0.5
Branches: main

library/io.m:
    Implement make_err_msg on the IL backend.


Index: io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/io.m,v
retrieving revision 1.236
diff -u -r1.236 io.m
--- io.m	14 Dec 2001 15:50:11 -0000	1.236
+++ io.m	14 Dec 2001 16:04:29 -0000
@@ -1620,10 +1620,10 @@
 }").
 
 :- pragma foreign_proc("MC++", 
-	make_err_msg(_Msg0::in, _Msg::out, _IO0::di, _IO::uo),
+	make_err_msg(Msg0::in, Msg::out, _IO0::di, _IO::uo),
 		will_not_call_mercury,
 "{
-	mercury::runtime::Errors::SORRY(""foreign code for this function"");
+	Msg = System::String::Concat(Msg0, MR_io_exception->Message);
 }").
 
 
@@ -3176,6 +3176,8 @@
 static MR_MercuryFile mercury_current_binary_output =
         new_mercury_file(0, 1);
 
+static System::IO::IOException *MR_io_exception;
+
 ").
 
 
@@ -3231,7 +3233,7 @@
 			stream = System::IO::File::Open(filename, fa);
 		}
 	} catch (System::IO::IOException* e) {
-		System::Console::WriteLine(e->Message);
+		MR_io_exception = e;
 	}
 
         if (!stream) {

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list