home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / 1&1 / java.z / java_301 / netscape / applet / AppletSecurityException.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-10-20  |  1.3 KB  |  19 lines

  1. package netscape.applet;
  2.  
  3. public class AppletSecurityException extends SecurityException {
  4.    public AppletSecurityException(String name) {
  5.       super(getProperty(name));
  6.       System.err.println("# Security Exception: " + name);
  7.    }
  8.  
  9.    public AppletSecurityException(String name, String arg) {
  10.       super(getProperty(name) + ": " + arg);
  11.       System.err.println("# Security Exception: " + name + ":" + arg);
  12.    }
  13.  
  14.    private static String getProperty(String name) {
  15.       SecurityManager.setScopePermission();
  16.       return System.getProperty("security." + name, "security." + name);
  17.    }
  18. }
  19.