Index: mttroot/mtt/bin/trans/abg2cbg_m
==================================================================
--- mttroot/mtt/bin/trans/abg2cbg_m
+++ mttroot/mtt/bin/trans/abg2cbg_m
@@ -11,10 +11,13 @@
 ###############################################################
 ## Version control history
 ###############################################################
 ## $Id$
 ## $Log$
+## Revision 1.6  1996/08/24 14:36:01  peter
+## Error handling included.
+##
 ## Revision 1.5  1996/08/19 15:38:31  peter
 ## Removed bug work round.
 ##
 ## Revision 1.4  1996/08/16 14:28:45  peter
 ## Some debugging lines removed.
@@ -94,11 +97,11 @@
 
 #Inform user
 echo Creating $1_cbg.m
 
 # Use matrix manipulation to accomplish the transformation
-$MATRIX  >abg2cbg_m.log  2>mtt_error << EOF
+$MATRIX  >abg2cbg_m.log  2>mtt_error.txt << EOF
 
   infofile= '$infofile';
 
   %Convert from acausal to causal bond graph in m-file form.
   system_name = '$1';
@@ -110,23 +113,10 @@
   [cbonds,status] = abg2cbg(system_name, '', '', port_bonds,infofile);
 
 EOF
 
 cat mtt_info.txt
-
-# Test for errors and print if any
-err_length=$(wc -c <mtt_error)
-if [ $err_length != "0" ]
-then
-  echo MTT has failed with the following errors '...'
-  cat mtt_error
-  exit 1
-else
-  exit 0
-fi
-
-
 
 cp $1_$1_cbg.m $1_cbg.m 
 
-
-
+# Print errors, if any.
+mtt_error error.txt