use application's event logger for error messages
instead of the one from helma.main.Server.
This commit is contained in:
parent
29943bd3e9
commit
b00f663f47
2 changed files with 2 additions and 4 deletions
|
@ -9,7 +9,6 @@ import javax.mail.internet.*;
|
||||||
import javax.activation.*;
|
import javax.activation.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import helma.main.Server;
|
|
||||||
import helma.framework.core.*;
|
import helma.framework.core.*;
|
||||||
import helma.util.*;
|
import helma.util.*;
|
||||||
import FESI.Data.*;
|
import FESI.Data.*;
|
||||||
|
@ -57,7 +56,7 @@ public class ESMail extends ESObject implements Serializable {
|
||||||
Session session = Session.getDefaultInstance(props, null);
|
Session session = Session.getDefaultInstance(props, null);
|
||||||
message = new MimeMessage (session);
|
message = new MimeMessage (session);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Server.getLogger().log ("caught in mail constructor: "+t);
|
this.evaluator.reval.app.logEvent ("Error in mail constructor: "+t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
package helma.scripting.fesi.extensions;
|
package helma.scripting.fesi.extensions;
|
||||||
|
|
||||||
import helma.main.Server;
|
|
||||||
import helma.util.*;
|
import helma.util.*;
|
||||||
|
|
||||||
import FESI.Interpreter.*;
|
import FESI.Interpreter.*;
|
||||||
|
@ -243,7 +242,7 @@ public class MailExtension extends Extension {
|
||||||
try {
|
try {
|
||||||
mail.send ();
|
mail.send ();
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
Server.getLogger().log ("Error sending mail: "+x);
|
this.evaluator.reval.app.logEvent ("Error sending mail: "+x);
|
||||||
mail.setStatus (ESMail.SEND);
|
mail.setStatus (ESMail.SEND);
|
||||||
return ESBoolean.makeBoolean(false);
|
return ESBoolean.makeBoolean(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue