mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 00:07:12 -07:00
Reverted sign exception modifications
This commit is contained in:
parent
1ab53f5bad
commit
87735bb88e
2 changed files with 5 additions and 7 deletions
|
@ -348,12 +348,12 @@ public class PublishOperation extends AbstractOperation<PublishOperation> {
|
|||
try {
|
||||
process.waitFor();
|
||||
} catch (InterruptedException e) {
|
||||
throw new SignException(file, new InterruptedException(e.getMessage()));
|
||||
throw new SignException(file, e.getMessage());
|
||||
}
|
||||
|
||||
if (process.exitValue() != 0) {
|
||||
var error = FileUtils.readString(process.getErrorStream());
|
||||
throw new SignException(file, new IOException(error));
|
||||
throw new SignException(file, error);
|
||||
}
|
||||
return FileUtils.readString(process.getInputStream());
|
||||
}
|
||||
|
|
|
@ -19,12 +19,10 @@ public class SignException extends RuntimeException {
|
|||
private final File file_;
|
||||
private final String reason_;
|
||||
|
||||
public SignException(File file, Throwable reason) {
|
||||
super("An error occurred while signing '" + file, reason);
|
||||
public SignException(File file, String reason) {
|
||||
super("An error occurred while signing '" + file + "':\n" + reason);
|
||||
file_ = file;
|
||||
if (reason.getCause() != null && reason.getCause().getMessage() != null)
|
||||
reason_ = reason.getCause().getMessage();
|
||||
else reason_ = "";
|
||||
reason_ = reason;
|
||||
}
|
||||
|
||||
public File getFile() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue