Rewrite TRY/CATCH
[deliverable/binutils-gdb.git] / gdb / cli / cli-script.c
index f558c06f830abaeabe16141d162397ae39446011..49645537fe32e00b318995f88c24ee5961423535 100644 (file)
@@ -1050,16 +1050,15 @@ process_next_line (const char *p, struct command_line **command,
 
   if (validator)
     {
-      TRY
+      try
        {
          validator ((*command)->line);
        }
-      CATCH (ex, RETURN_MASK_ALL)
+      catch (const gdb_exception_RETURN_MASK_ALL &ex)
        {
          free_command_lines (command);
          throw_exception (ex);
        }
-      END_CATCH
     }
 
   /* Nothing special.  */
@@ -1540,11 +1539,11 @@ script_from_file (FILE *stream, const char *file)
 
   scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
 
-  TRY
+  try
     {
       read_command_file (stream);
     }
-  CATCH (e, RETURN_MASK_ERROR)
+  catch (const gdb_exception_RETURN_MASK_ERROR &e)
     {
       /* Re-throw the error, but with the file name information
         prepended.  */
@@ -1553,7 +1552,6 @@ script_from_file (FILE *stream, const char *file)
                   source_file_name.c_str (), source_line_number,
                   e.what ());
     }
-  END_CATCH
 }
 
 /* Print the definition of user command C to STREAM.  Or, if C is a
This page took 0.024043 seconds and 4 git commands to generate.