Changeset 5140


Ignore:
Timestamp:
Jan 20, 2012 5:22:06 AM (4 months ago)
Author:
Zoey76
Message:

BETA: Getting rid of printStackTrace()

Location:
branches/unstable/L2J_Server_BETA/java/com/l2jserver
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/Config.java

    r5127 r5140  
    11931193                                catch (Exception e) 
    11941194                                { 
    1195                                         e.printStackTrace(); 
     1195                                        _log.warning("Config: " + e.getMessage()); 
    11961196                                        throw new Error("Failed to Load "+CONFIGURATION_FILE+" File."); 
    11971197                                } 
     
    12531253                                catch (Exception e) 
    12541254                                { 
    1255                                         e.printStackTrace(); 
     1255                                        _log.warning("Config: " + e.getMessage()); 
    12561256                                        throw new Error("Failed to Load "+IP_CONFIG_FILE+" File."); 
    12571257                                } 
     
    12711271                                catch (Exception e) 
    12721272                                { 
    1273                                         e.printStackTrace(); 
     1273                                        _log.warning("Config: " + e.getMessage()); 
    12741274                                        throw new Error("Failed to Load "+COMMUNITY_CONFIGURATION_FILE+" File."); 
    12751275                                } 
     
    14901490                                catch (Exception e) 
    14911491                                { 
    1492                                         e.printStackTrace(); 
     1492                                        _log.warning("Config: " + e.getMessage()); 
    14931493                                        throw new Error("Failed to Load "+FEATURE_CONFIG_FILE+" File."); 
    14941494                                } 
     
    17541754                                catch (Exception e) 
    17551755                                { 
    1756                                         e.printStackTrace(); 
     1756                                        _log.warning("Config: " + e.getMessage()); 
    17571757                                        throw new Error("Failed to Load "+CHARACTER_CONFIG_FILE+" file."); 
    17581758                                } 
     
    18011801                                catch (Exception e) 
    18021802                                { 
    1803                                         e.printStackTrace(); 
     1803                                        _log.warning("Config: " + e.getMessage()); 
    18041804                                        throw new Error("Failed to Load "+TELNET_FILE+" File."); 
    18051805                                } 
     
    18201820                                catch (Exception e) 
    18211821                                { 
    1822                                         e.printStackTrace(); 
     1822                                        _log.warning("Config: " + e.getMessage()); 
    18231823                                        throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File."); 
    18241824                                } 
     
    18381838                                catch (Exception e) 
    18391839                                { 
    1840                                         e.printStackTrace(); 
     1840                                        _log.warning("Config: " + e.getMessage()); 
    18411841                                        throw new Error("Failed to Load "+ID_CONFIG_FILE+" file."); 
    18421842                                } 
     
    20892089                                catch (Exception e) 
    20902090                                { 
    2091                                         e.printStackTrace(); 
     2091                                        _log.warning("Config: " + e.getMessage()); 
    20922092                                        throw new Error("Failed to Load "+GENERAL_CONFIG_FILE+" File."); 
    20932093                                } 
     
    21042104                                catch (Exception e) 
    21052105                                { 
    2106                                         e.printStackTrace(); 
     2106                                        _log.warning("Config: " + e.getMessage()); 
    21072107                                        throw new Error("Failed to Load "+FLOOD_PROTECTOR_FILE); 
    21082108                                } 
     
    22002200                                catch (Exception e) 
    22012201                                { 
    2202                                         e.printStackTrace(); 
     2202                                        _log.warning("Config: " + e.getMessage()); 
    22032203                                        throw new Error("Failed to Load "+NPC_CONFIG_FILE+" File."); 
    22042204                                } 
     
    22952295                                        { 
    22962296                                                _log.warning("Error while loading Player XP percent lost"); 
    2297                                                 e.printStackTrace(); 
     2297                                                _log.warning("Config: " + e.getMessage()); 
    22982298                                        } 
    22992299                                         
     
    23282328                                catch (Exception e) 
    23292329                                { 
    2330                                         e.printStackTrace(); 
     2330                                        _log.warning("Config: " + e.getMessage()); 
    23312331                                        throw new Error("Failed to Load "+RATES_CONFIG_FILE+" File."); 
    23322332                                } 
     
    26502650                                catch (Exception e) 
    26512651                                { 
    2652                                         e.printStackTrace(); 
     2652                                        _log.warning("Config: " + e.getMessage()); 
    26532653                                        throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File."); 
    26542654                                } 
     
    26932693                                catch (Exception e) 
    26942694                                { 
    2695                                         e.printStackTrace(); 
     2695                                        _log.warning("Config: " + e.getMessage()); 
    26962696                                        throw new Error("Failed to Load "+PVP_CONFIG_FILE+" File."); 
    26972697                                } 
     
    27482748                                catch (Exception e) 
    27492749                                { 
    2750                                         e.printStackTrace(); 
     2750                                        _log.warning("Config: " + e.getMessage()); 
    27512751                                        throw new Error("Failed to Load "+OLYMPIAD_CONFIG_FILE+" File."); 
    27522752                                } 
     
    28652865                                catch (Exception e) 
    28662866                                { 
    2867                                         e.printStackTrace(); 
     2867                                        _log.warning("Config: " + e.getMessage()); 
    28682868                                        throw new Error("Failed to Load " + GRANDBOSS_CONFIG_FILE + " File."); 
    28692869                                } 
     
    28832883                                catch (Exception e) 
    28842884                                { 
    2885                                         e.printStackTrace(); 
     2885                                        _log.warning("Config: " + e.getMessage()); 
    28862886                                        throw new Error("Failed to Load " + GRACIASEEDS_CONFIG_FILE + " File."); 
    28872887                                } 
     
    29032903                                catch (Exception e) 
    29042904                                { 
    2905                                         e.printStackTrace(); 
     2905                                        _log.warning("Config: " + e.getMessage()); 
    29062906                                        throw new Error("Failed to Load " + CHAT_FILTER_FILE + " File."); 
    29072907                                } 
     
    29222922                                catch (Exception e) 
    29232923                                { 
    2924                                         e.printStackTrace(); 
     2924                                        _log.warning("Config: " + e.getMessage()); 
    29252925                                        throw new Error("Failed to Load " + SECURITY_CONFIG_FILE + " File."); 
    29262926                                } 
     
    29402940                                catch(Exception e) 
    29412941                                { 
    2942                                         e.printStackTrace(); 
     2942                                        _log.warning("Config: " + e.getMessage()); 
    29432943                                } 
    29442944                        } 
     
    30043004                                catch (Exception e) 
    30053005                                { 
    3006                                         e.printStackTrace(); 
     3006                                        _log.warning("Config: " + e.getMessage()); 
    30073007                                        throw new Error("Failed to Load " + LOGIN_CONFIGURATION_FILE + " File."); 
    30083008                                } 
     
    30223022                                catch (Exception e) 
    30233023                                { 
    3024                                         e.printStackTrace(); 
     3024                                        _log.warning("Config: " + e.getMessage()); 
    30253025                                        throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File."); 
    30263026                                } 
     
    30373037                                catch (Exception e) 
    30383038                                { 
    3039                                         e.printStackTrace(); 
     3039                                        _log.warning("Config: " + e.getMessage()); 
    30403040                                        throw new Error("Failed to Load "+TELNET_FILE+" File."); 
    30413041                                } 
     
    30653065                                catch (Exception e) 
    30663066                                { 
    3067                                         e.printStackTrace(); 
     3067                                        _log.warning("Config: " + e.getMessage()); 
    30683068                                        throw new Error("Failed to Load " + EMAIL_CONFIG_FILE + " File."); 
    30693069                                } 
     
    35123512                { 
    35133513                        _log.warning(StringUtil.concat("Failed to save hex id to ", fileName, " File.")); 
    3514                         e.printStackTrace(); 
     3514                        _log.warning("Config: " + e.getMessage()); 
    35153515                } 
    35163516        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/MultiSell.java

    r5093 r5140  
    287287                                                catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException | DOMException e1) 
    288288                                                { 
    289                                                         _log.warning(e.getLocalizedMessage() + doc.getLocalName()); 
     289                                                        _log.warning(e.getMessage() + doc.getLocalName()); 
    290290                                                        list.setUseRate(1.0); 
    291                                                         e.printStackTrace(); 
    292291                                                } 
    293292 
     
    295294                                        catch (DOMException e)  
    296295                                        { 
    297                                                 _log.warning(e.getLocalizedMessage() + doc.getLocalName()); 
    298                                                 e.printStackTrace(); 
     296                                                _log.warning(e.getMessage() + doc.getLocalName()); 
    299297                                        } 
    300                                          
    301298                                } 
    302299                                 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/CHSiegeManager.java

    r5093 r5140  
    9797                { 
    9898                        _log.warning("CHSiegeManager: Could not load siegable clan halls!:"); 
    99                         e.printStackTrace(); 
    10099                } 
    101100                finally 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HandysBlockCheckerManager.java

    r5126 r5140  
    1919import java.util.ArrayList; 
    2020import java.util.List; 
     21import java.util.logging.Logger; 
    2122 
    2223import javolution.util.FastList; 
     
    4647public final class HandysBlockCheckerManager  
    4748{ 
    48         // All the participants and their team classifed by arena 
     49        private static final Logger _log = Logger.getLogger(HandysBlockCheckerManager.class.getName()); 
     50         
     51        // All the participants and their team classified by arena 
    4952        private static ArenaParticipantsHolder[] _arenaPlayers = new ArenaParticipantsHolder[4]; 
    5053         
     
    512515                        catch(Exception e) 
    513516                        { 
    514                                 e.printStackTrace(); 
     517                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    515518                        } 
    516519                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/HellboundManager.java

    r4958 r5140  
    213213                        catch (Exception e) 
    214214                        { 
    215                                 e.printStackTrace(); 
     215                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    216216                        } 
    217217                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/MapRegionManager.java

    r5124 r5140  
    8484                catch (Exception e) 
    8585                { 
    86                         e.printStackTrace(); 
    8786                        _log.log(Level.SEVERE, "Failed loading MapRegion", e); 
    8887                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/BlockCheckerEngine.java

    r5083 r5140  
    459459                        catch(Exception e) 
    460460                        { 
    461                                 e.printStackTrace(); 
     461                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    462462                        } 
    463463                         
     
    483483                                { 
    484484                                        _log.warning("Couldnt Spawn Block Checker NPCs! Wrong instance type at npc table?"); 
    485                                         if(Config.DEBUG)  
    486                                                 e.printStackTrace();  
     485                                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    487486                                } 
    488487                        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/L2Event.java

    r5107 r5140  
    392392                catch (Exception e) 
    393393                { 
    394                         e.printStackTrace(); 
     394                        _log.warning("L2Event: " + e.getMessage()); 
    395395                        return "Cannot start event participation, an error has occured."; 
    396396                } 
     
    460460                catch (Exception e) 
    461461                { 
    462                         e.printStackTrace(); 
     462                        _log.warning("L2Event: " + e.getMessage()); 
    463463                        return "Cannot start event, an error has occured."; 
    464464                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java

    r5038 r5140  
    110110                catch(Exception e) 
    111111                { 
    112                         _log.warning(getName()+": Could not load siege attackers!:"); 
    113                         e.printStackTrace(); 
     112                        _log.warning(getName() + ": Could not load siege attackers!:"); 
    114113                } 
    115114                finally 
     
    146145                catch(Exception e) 
    147146                { 
    148                         _log.warning(getName()+": Couldnt save attacker list!"); 
    149                         e.printStackTrace(); 
     147                        _log.warning(getName() + ": Couldnt save attacker list!"); 
    150148                } 
    151149                finally 
     
    186184                        catch(Exception e) 
    187185                        { 
    188                                 _log.warning(getName()+": Couldnt load siege guards!:"); 
    189                                 e.printStackTrace(); 
     186                                _log.warning(getName() + ": Couldnt load siege guards!:"); 
    190187                        } 
    191188                        finally 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java

    r5083 r5140  
    835835                _log.log(Level.WARNING, this.getScriptFile().getAbsolutePath(), t); 
    836836                if (t.getMessage() == null) 
    837                         t.printStackTrace(); 
     837                { 
     838                        _log.warning(getClass().getSimpleName() + ": " + t.getMessage()); 
     839                } 
    838840                if (player != null && player.getAccessLevel().isGm()) 
    839841                { 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/model/zone/type/L2PeaceZone.java

    r5139 r5140  
    4848                                return; 
    4949                        } 
     50                         
     51                        if (!getAllowStore()) 
     52                        { 
     53                                character.setInsideZone(L2Character.ZONE_NOSTORE, true); 
     54                        } 
    5055                } 
    5156                 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptDocument.java

    r4417 r5140  
    2929/** 
    3030 * 
    31  * 
    3231 */ 
    3332public class ScriptDocument 
    3433{ 
    35         protected static final Logger _log = Logger.getLogger(ScriptDocument.class.getName()); 
     34        private static final Logger _log = Logger.getLogger(ScriptDocument.class.getName()); 
     35         
    3636        private Document _document; 
    3737        private String _name; 
     
    4747                        _document = builder.parse( input ); 
    4848                         
    49                 } catch (SAXException sxe) { 
     49                } 
     50                catch (SAXException sxe) 
     51                { 
    5052                        // Error generated during parsing) 
    5153                        Exception  x = sxe; 
    5254                        if (sxe.getException() != null) 
     55                        { 
    5356                                x = sxe.getException(); 
    54                         x.printStackTrace(); 
    55                          
    56                 } catch (ParserConfigurationException pce) { 
     57                        } 
     58                        _log.warning(getClass().getSimpleName() + ": " + x.getMessage()); 
     59                } 
     60                catch (ParserConfigurationException pce) 
     61                { 
    5762                        // Parser with specified options can't be built 
    5863                        _log.log(Level.WARNING, "", pce); 
    5964                         
    60                 } catch (IOException ioe) { 
     65                } 
     66                catch (IOException ioe) 
     67                { 
    6168                        // I/O error 
    6269                        _log.log(Level.WARNING, "", ioe); 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/gameserver/script/ScriptPackage.java

    r4921 r5140  
    1818import java.util.Enumeration; 
    1919import java.util.List; 
     20import java.util.logging.Logger; 
    2021import java.util.zip.ZipEntry; 
    2122import java.util.zip.ZipFile; 
     
    2829public class ScriptPackage 
    2930{ 
     31        private static final Logger _log = Logger.getLogger(ScriptPackage.class.getName()); 
     32         
    3033        private List<ScriptDocument> _scriptFiles; 
    3134        private List<String> _otherFiles; 
     
    7174                                        _scriptFiles.add(newScript); 
    7275                                } 
    73                                 catch (IOException e1) 
     76                                catch (IOException io) 
    7477                                { 
    75                                         e1.printStackTrace(); 
     78                                        _log.warning(getClass().getSimpleName() + ": " + io.getMessage()); 
    7679                                } 
    7780                        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/FloodProtectedListener.java

    r4417 r5140  
    159159                catch (IOException e) 
    160160                { 
    161                         e.printStackTrace(); 
     161                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    162162                } 
    163163        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerTable.java

    r4716 r5140  
    141141                catch (XMLStreamException xppe) 
    142142                { 
    143                         xppe.printStackTrace(); 
     143                        _log.warning(getClass().getSimpleName() + ": " + xppe.getMessage()); 
    144144                } 
    145145                finally 
     
    151151                        catch (Exception e) 
    152152                        { 
     153                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    153154                        } 
    154155                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/GameServerThread.java

    r4921 r5140  
    215215                catch (IOException e) 
    216216                { 
    217                         e.printStackTrace(); 
     217                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    218218                } 
    219219                KeyPair pair = GameServerTable.getInstance().getKeyPair(); 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/L2LoginServer.java

    r4645 r5140  
    4747public class L2LoginServer 
    4848{ 
     49        private final Logger _log = Logger.getLogger(L2LoginServer.class.getName()); 
     50         
    4951        public static final int PROTOCOL_REV = 0x0106; 
    50          
    5152        private static L2LoginServer _instance; 
    52         private final Logger _log = Logger.getLogger(L2LoginServer.class.getName()); 
    5353        private GameServerListener _gameServerListener; 
    5454        private SelectorThread<L2LoginClient> _selectorThread; 
     
    8888                catch (IOException e) 
    8989                { 
    90                         e.printStackTrace(); 
     90                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    9191                } 
    9292                finally 
     
    101101                        catch (IOException e) 
    102102                        { 
    103                                 e.printStackTrace(); 
     103                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    104104                        } 
    105105                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/mail/BaseMail.java

    r5134 r5140  
    103103                catch (MessagingException e) 
    104104                { 
    105                         e.printStackTrace(); 
     105                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    106106                } 
    107107        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/network/L2LoginClient.java

    r5038 r5140  
    9696                catch (IOException e) 
    9797                { 
    98                         e.printStackTrace(); 
    99                         super.getConnection().close((SendablePacket<L2LoginClient>)null); 
     98                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
     99                        super.getConnection().close((SendablePacket<L2LoginClient>) null); 
    100100                        return false; 
    101101                } 
     
    125125                catch (IOException e) 
    126126                { 
    127                         e.printStackTrace(); 
     127                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    128128                        return false; 
    129129                } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/network/gameserverpackets/RequestTempBan.java

    r4645 r5140  
    1919import java.sql.PreparedStatement; 
    2020import java.sql.SQLException; 
     21import java.util.logging.Logger; 
    2122 
    2223import com.l2jserver.L2DatabaseFactory; 
     
    2526 
    2627/** 
    27  *  
    2828 * @author mrTJO 
    2929 */ 
    3030public class RequestTempBan extends BaseRecievePacket 
    3131{ 
    32         String _accountName, _banReason, _ip; 
     32        private static final Logger _log = Logger.getLogger(RequestTempBan.class.getName()); 
     33         
     34        private final String _accountName; 
     35        @SuppressWarnings("unused") 
     36        private String _banReason; 
     37        private String _ip; 
    3338        long _banTime; 
    3439         
     
    6671                catch (SQLException e) 
    6772                { 
    68                         e.printStackTrace(); 
     73                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    6974                } 
    7075                finally 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/loginserver/network/serverpackets/ServerList.java

    r4645 r5140  
    2020import java.util.List; 
    2121import java.util.Map; 
     22import java.util.logging.Logger; 
    2223 
    2324import com.l2jserver.loginserver.GameServerTable; 
     
    5354public final class ServerList extends L2LoginServerPacket 
    5455{ 
     56        private static final Logger _log = Logger.getLogger(ServerList.class.getName()); 
     57         
    5558        private List<ServerData> _servers; 
    5659        private int _lastServer; 
     
    8083                        catch (UnknownHostException e) 
    8184                        { 
    82                                 e.printStackTrace(); 
     85                                _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    8386                                _ip = new byte[4]; 
    8487                                _ip[0] = 127; 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/status/GameStatusThread.java

    r5080 r5140  
    2525import java.net.Socket; 
    2626import java.util.Properties; 
     27import java.util.logging.Logger; 
    2728 
    2829import com.l2jserver.Config; 
     
    3233public class GameStatusThread extends Thread 
    3334{ 
     35        private static final Logger _log = Logger.getLogger(GameStatusThread.class.getName()); 
     36         
    3437        private final Socket _cSocket; 
    3538         
     
    213216                catch (IOException e) 
    214217                { 
    215                         e.printStackTrace(); 
     218                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    216219                } 
    217220        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/status/LoginStatusThread.java

    r4707 r5140  
    259259                catch (IOException e) 
    260260                { 
    261                         e.printStackTrace(); 
     261                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    262262                } 
    263263        } 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/status/Status.java

    r4417 r5140  
    7474                                        catch (IOException io) 
    7575                                        { 
    76                                                 io.printStackTrace(); 
     76                                                _log.warning(getClass().getSimpleName() + ": " + io.getMessage()); 
    7777                                        } 
    7878                                        break; 
     
    8989                                        catch (IOException io) 
    9090                                        { 
    91                                                 io.printStackTrace(); 
     91                                                _log.warning(getClass().getSimpleName() + ": " + io.getMessage()); 
    9292                                        } 
    9393                                        break; 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/util/Base64.java

    r4921 r5140  
    1818import java.io.IOException; 
    1919import java.io.InputStreamReader; 
    20  
     20import java.util.logging.Logger; 
    2121 
    2222/** 
     
    3939public class Base64 
    4040{ 
     41        private static final Logger _log = Logger.getLogger(Base64.class.getName()); 
    4142         
    4243        /*  P U B L I C F I E L D S */ 
     
    519520                        catch (java.io.IOException e) 
    520521                        { 
    521                                 e.printStackTrace(); 
     522                                _log.warning("Base64: " + e.getMessage()); 
    522523                                return null; 
    523524                        } // end catch 
     
    893894                catch (java.io.IOException e) 
    894895                { 
    895                         e.printStackTrace(); 
     896                        _log.warning("Base64: " + e.getMessage()); 
    896897                } 
    897898                catch (java.lang.ClassNotFoundException e) 
    898899                { 
    899                         e.printStackTrace(); 
     900                        _log.warning("Base64: " + e.getMessage()); 
    900901                } 
    901902                finally 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/util/Util.java

    r5130 r5140  
    1818import java.net.UnknownHostException; 
    1919import java.nio.ByteBuffer; 
     20import java.util.logging.Logger; 
    2021 
    2122/** 
     
    2627public class Util 
    2728{ 
     29        private static final Logger _log = Logger.getLogger(Util.class.getName()); 
     30         
    2831        /** 
    2932         * Checks if a host name is internal 
     
    4447                catch (UnknownHostException e) 
    4548                { 
    46                         e.printStackTrace(); 
     49                        _log.warning("Util: " + e.getMessage()); 
    4750                } 
    4851                return false; 
     
    186189        /** 
    187190         * Method to get the stack trace of a Throwable into a String 
    188          *  
    189          * @param t 
    190          *      Throwable to get the stacktrace from 
    191          * @return 
    192          *      stack trace from Throwable as String 
     191         * @param t Throwable to get the stacktrace from 
     192         * @return stack trace from Throwable as String 
    193193         */ 
    194194        public static String getStackTrace(Throwable t) 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/util/network/BaseRecievePacket.java

    r4426 r5140  
    1515package com.l2jserver.util.network; 
    1616 
     17import java.util.logging.Logger; 
     18 
    1719/** 
    1820 * This class ... 
     
    2224public abstract class BaseRecievePacket 
    2325{ 
     26        private static final Logger _log = Logger.getLogger(BaseRecievePacket.class.getName()); 
     27         
    2428        private byte[] _decrypt; 
    2529        private int _off; 
     
    7680                catch (Exception e) 
    7781                { 
    78                         e.printStackTrace(); 
     82                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    7983                } 
    8084                _off += result.length()*2 + 2; 
  • branches/unstable/L2J_Server_BETA/java/com/l2jserver/util/network/BaseSendablePacket.java

    r4417 r5140  
    1717import java.io.ByteArrayOutputStream; 
    1818import java.io.IOException; 
     19import java.util.logging.Logger; 
    1920 
    2021/** 
     
    2526public abstract class BaseSendablePacket 
    2627{ 
    27         ByteArrayOutputStream _bao; 
     28        private static final Logger _log = Logger.getLogger(BaseSendablePacket.class.getName()); 
     29         
     30        private final ByteArrayOutputStream _bao; 
    2831         
    2932        protected BaseSendablePacket() 
     
    7578                catch (Exception e) 
    7679                { 
    77                         e.printStackTrace(); 
     80                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    7881                } 
    7982                 
     
    9093                catch (IOException e) 
    9194                { 
    92                         e.printStackTrace(); 
     95                        _log.warning(getClass().getSimpleName() + ": " + e.getMessage()); 
    9396                } 
    9497        } 
Note: See TracChangeset for help on using the changeset viewer.