Skip to content
Snippets Groups Projects
Commit 0003bb67 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

merge capture regions, so the library interface code can compiled with exceptions

parent 523978b4
No related branches found
No related tags found
No related merge requests found
......@@ -276,13 +276,6 @@ void lammps_commands_string(void *ptr, char *str)
{
LAMMPS *lmp = (LAMMPS *) ptr;
BEGIN_CAPTURE
{
if (lmp->update->whichflag != 0)
lmp->error->all(FLERR,"Library error: issuing LAMMPS command during run");
}
END_CAPTURE
// make copy of str so can strtok() it
int n = strlen(str) + 1;
......@@ -291,6 +284,11 @@ void lammps_commands_string(void *ptr, char *str)
BEGIN_CAPTURE
{
if (lmp->update->whichflag != 0) {
delete [] copy;
lmp->error->all(FLERR,"Library error: issuing LAMMPS command during run");
}
char *ptr = copy;
for (int i=0; i < n-1; ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment