/** * Wrap an existing exception in a TransformerException. * * <p>This is used for throwing processor exceptions before * the processing has started.</p> * * @param message The error or warning message, or null to * use the message from the embedded exception. * @param e Any exception */ public TransformerException(String message, java.lang.Throwable e) : base(((message == null) || (message.length() == 0)) ? e.toString() : message) { this.containedException = e; this.locator = null; }
/** * Add a permission object to the permission collection. * * @param permission * the FilePermission object to add to the collection. * @throws IllegalArgumentException * if {@code permission} is not an instance of * {@code FilePermission}. * @throws IllegalStateException * if this collection is read-only. * @see java.security.PermissionCollection#add(java.security.Permission) */ public override void add(java.security.Permission permission) { if (isReadOnly()) { throw new java.lang.IllegalStateException(); } if (permission is FilePermission) { permissions.addElement(permission); } else { throw new java.lang.IllegalArgumentException(permission.toString()); } }
public static Process exec(String[] cmdArray, String[] env, java.io.File dir) { Process p = new Process(); p.StartInfo.WorkingDirectory = (null!=dir) ? dir.toString () : SystemJ.getProperty("user.dir"); p.StartInfo.FileName = cmdArray[0]; for (int i = 0; i < env.Length; i++) { String [] keyValue = env [i].Split ('='); p.StartInfo.EnvironmentVariables.Add (keyValue[0],keyValue[1]); } for (int i = 1; i < cmdArray.Length; i++) { p.StartInfo.Arguments.Insert(i - 1, cmdArray[i]); } p.StartInfo.UseShellExecute = true; p.Start(); return p; }
/** * Constructs a new <code>TransformException</code> with the specified * cause and a detail message of * <code>(cause==null ? null : cause.toString())</code> * (which typically contains the class and detail message of * <code>cause</code>). * * @param cause the cause (A <tt>null</tt> value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public TransformException(java.lang.Throwable cause) : base(cause==null ? null : cause.toString()) { this.cause = cause; }
/** * Constructs a new <code>NoSuchMechanismException</code> with the * specified cause and a detail message of * <code>(cause==null ? null : cause.toString())</code> (which typically * contains the class and detail message of <code>cause</code>). * * @param cause the cause (A <tt>null</tt> value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public NoSuchMechanismException(java.lang.Throwable cause) : base(cause == null ? null : cause.toString()) { this.cause = cause; }
/** * Appends the character sequence {@code csq} to the target stream. This * method works the same way as {@code PrintStream.print(csq.toString())}. * If {@code csq} is {@code null}, then the string "null" is written to the * target stream. * * @param csq * the character sequence appended to the target stream. * @return this stream. */ public PrintStream append(java.lang.CharSequence csq) { if (null == csq) { print(TOKEN_NULL); } else { print(csq.toString()); } return this; }
/** * Create a new TransformerException wrapping an existing exception. * * @param e The exception to be wrapped. */ public TransformerException(java.lang.Throwable e) : base(e.toString()) { this.containedException = e; this.locator = null; }
/** * Constructs a new <code>URIReferenceException</code> with the specified * cause and a detail message of <code>(cause==null ? null : * cause.toString())</code> (which typically contains the class and detail * message of <code>cause</code>). * * @param cause the cause (A <tt>null</tt> value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public URIReferenceException(java.lang.Throwable cause) : base(cause == null ? null : cause.toString()) { this.cause = cause; }
/** * Create a new <code>FactoryConfigurationError</code> with a * given <code>Exception</code> base cause of the error. * * @param e The exception to be encapsulated in a * FactoryConfigurationError. */ public FactoryConfigurationError(java.lang.Exception e) : base(e.toString()) { this.exception = e; }
/** * Appends the character sequence {@code csq} to the target. This method * works the same way as {@code Writer.write(csq.toString())}. If {@code * csq} is {@code null}, then the string "null" is written to the target * stream. * * @param csq * the character sequence appended to the target. * @return this writer. * @throws IOException * if this writer is closed or another I/O error occurs. */ public virtual Writer append(java.lang.CharSequence csq) { // throws IOException { if (null == csq) { write(TOKEN_NULL); } else { write(csq.toString()); } return this; }
/** * Appends the character sequence {@code csq} to this writer's {@code * StringBuffer}. This method works the same way as {@code * StringWriter.write(csq.toString())}. If {@code csq} is {@code null}, then * the string "null" is written to the target stream. * * @param csq * the character sequence appended to the target. * @return this writer. */ public new StringWriter append(java.lang.CharSequence csq) { if (null == csq) { write(TOKEN_NULL); } else { write(csq.toString()); } return this; }
/** * Constructs a new <code>KeySelectorException</code> with the specified * cause and a detail message of * <code>(cause==null ? null : cause.toString())</code> * (which typically contains the class and detail message of * <code>cause</code>). * * @param cause the cause (A <tt>null</tt> value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public KeySelectorException(java.lang.Throwable cause) : base(cause == null ? null : cause.toString()) { this.cause = cause; }
/** * Constructs a new <code>XMLSignatureException</code> with the specified * cause and a detail message of * <code>(cause==null ? null : cause.toString())</code> * (which typically contains the class and detail message of * <code>cause</code>). * * @param cause the cause (A <tt>null</tt> value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public XMLSignatureException(java.lang.Throwable cause) : base(cause==null ? null : cause.toString()) { this.cause = cause; }
/** * Constructs an instance with a cause. If the cause is not * {@code null}, then {@code cause.toString()} is used as the * error's message. * * @param cause * the cause of the error or {@code null} if none. */ public AnnotationFormatError(java.lang.Throwable cause) : base(cause == null ? null : cause.toString(), cause) { }