0

Merge branch 'dev' into dev-baseq2

This commit is contained in:
2018-03-06 22:35:06 +03:00
3 changed files with 8 additions and 35 deletions

View File

@@ -243,18 +243,18 @@ public final class Com
public static Runnable Error_f= new Runnable() public static Runnable Error_f= new Runnable()
{ {
public void run() throws longjmpException public void run() throws IllegalStateException
{ {
Error(Defines.ERR_FATAL, Cmd.Argv(1)); Error(Defines.ERR_FATAL, Cmd.Argv(1));
} }
}; };
public static void Error(int code, String fmt) throws longjmpException public static void Error(int code, String fmt) throws IllegalStateException
{ {
Error(code, fmt, null); Error(code, fmt, null);
} }
public static void Error(int code, String fmt, Vargs vargs) throws longjmpException public static void Error(int code, String fmt, Vargs vargs) throws IllegalStateException
{ {
// va_list argptr; // va_list argptr;
// static char msg[MAXPRINTMSG]; // static char msg[MAXPRINTMSG];
@@ -271,7 +271,7 @@ public final class Com
{ {
CL.Drop(); CL.Drop();
recursive= false; recursive= false;
throw new longjmpException(); throw new IllegalStateException();
} }
else if (code == Defines.ERR_DROP) else if (code == Defines.ERR_DROP)
{ {
@@ -279,7 +279,7 @@ public final class Com
SV_MAIN.SV_Shutdown("Server crashed: " + msg + "\n", false); SV_MAIN.SV_Shutdown("Server crashed: " + msg + "\n", false);
CL.Drop(); CL.Drop();
recursive= false; recursive= false;
throw new longjmpException(); throw new IllegalStateException();
} }
else else
{ {
@@ -294,7 +294,7 @@ public final class Com
* Com_InitArgv checks the number of command line arguments * Com_InitArgv checks the number of command line arguments
* and copies all arguments with valid length into com_argv. * and copies all arguments with valid length into com_argv.
*/ */
static void InitArgv(String[] args) throws longjmpException static void InitArgv(String[] args) throws IllegalStateException
{ {
if (args.length > Defines.MAX_NUM_ARGVS) if (args.length > Defines.MAX_NUM_ARGVS)

View File

@@ -130,7 +130,7 @@ public final class Qcommon extends Globals {
// save config when configuration is completed // save config when configuration is completed
CL.WriteConfiguration(); CL.WriteConfiguration();
} catch (longjmpException e) { } catch (IllegalStateException e) {
Sys.Error("Error during initialization"); Sys.Error("Error during initialization");
} }
} }
@@ -227,7 +227,7 @@ public final class Qcommon extends Globals {
logger.info(String.format("all:%3d sv:%3d gm:%3d cl:%3d rf:%3d", all, sv, gm, cl, rf)); logger.info(String.format("all:%3d sv:%3d gm:%3d cl:%3d rf:%3d", all, sv, gm, cl, rf));
} }
} catch (longjmpException e) { } catch (IllegalStateException e) {
Com.DPrintf("lonjmp exception:" + e); Com.DPrintf("lonjmp exception:" + e);
} }
} }

View File

@@ -1,27 +0,0 @@
/*
* Copyright (C) 1997-2001 Id Software, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package lwjake2.qcommon;
/**
* longjmpException is used to replace the setjmp/longjmp code.
*/
@SuppressWarnings("serial")
public final class longjmpException extends IllegalStateException {
}