[
https://issues.apache.org/jira/browse/SSHD-1209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Susmit Sarkar updated SSHD-1209:
--------------------------------
Description:
Hello Team,
We have a class as below
{code:java}
DetailedSftpErrorStatusDataHandler implements SftpErrorStatusDataHandler,
ChannelSessionAware, DetailedSftpErrorStatusDataHandler implements
SftpErrorStatusDataHandler, ChannelSessionAware, AsyncCommandErrorStreamAware,
CommandDirectErrorStreamAware {
{code}
and we have overridden the :
resolveErrorMessage and setIoErrorStream(IoOutputStream errStream)
{code:java}
@Override
public void setIoErrorStream(IoOutputStream errStream) {
this.errStream = errStream;
}
{code}
finally we are writing to the error stream:
{code:java}
private void writeMsgToErrorStream(String refinedUserExitMessage) {
ByteArrayBuffer buf = new ByteArrayBuffer();
buf.putString(refinedUserExitMessage +
System.getProperty("line.separator"));
try { if (errStream != null) {
errStream.writeBuffer(buf);
}
} catch (Exception e) {
}
}
{code}
Once the data is written to error stream we are gettig proper message to the
console:
!image-2021-08-19-12-50-01-922.png!
But there is an extra charater getting appended at the first character *<*
Utils.java ....
I have no idea from where this *<* is coming from, and that changes with the
first character like if it is P it would be *>, when starting with S it gets
appended with Z*
Any help will be appreciated.
Thanks,
Susmit
was:
Hello Team,
We have a class as below
{code:java}
DetailedSftpErrorStatusDataHandler implements SftpErrorStatusDataHandler,
ChannelSessionAware, DetailedSftpErrorStatusDataHandler implements
SftpErrorStatusDataHandler, ChannelSessionAware, AsyncCommandErrorStreamAware,
CommandDirectErrorStreamAware {
{code}
and we have overridden the :
resolveErrorMessage and setIoErrorStream(IoOutputStream errStream)
{code:java}
@Override
public void setIoErrorStream(IoOutputStream errStream) {
this.errStream = errStream;
}
{code}
finally we are writing to the error stream:
{code:java}
private void writeMsgToErrorStream(String refinedUserExitMessage) {
ByteArrayBuffer buf = new ByteArrayBuffer();
buf.putString(refinedUserExitMessage +
System.getProperty("line.separator"));
try { if (errStream != null) {
errStream.writeBuffer(buf);
}
} catch (Exception e) {
}
}
{code}
Once the data is written to error stream we are gettig proper message to the
console:
!image-2021-08-19-12-50-01-922.png!
But there is an extra charater getting appended at the first character
*<*Utils.java ....
I have no idea from where this *<* is coming from, and that changes with the
first character like if it is P it would be *>, when starting with S it gets
appended with Z*
Any help will be appreciated.
Thanks,
Susmit
> Write to error stream for custom exception is appending a extra word at the
> beginning
> -------------------------------------------------------------------------------------
>
> Key: SSHD-1209
> URL: https://issues.apache.org/jira/browse/SSHD-1209
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 2.7.0
> Reporter: Susmit Sarkar
> Priority: Major
> Attachments: image-2021-08-19-12-50-01-922.png
>
>
> Hello Team,
>
> We have a class as below
>
> {code:java}
> DetailedSftpErrorStatusDataHandler implements SftpErrorStatusDataHandler,
> ChannelSessionAware, DetailedSftpErrorStatusDataHandler implements
> SftpErrorStatusDataHandler, ChannelSessionAware,
> AsyncCommandErrorStreamAware, CommandDirectErrorStreamAware {
> {code}
> and we have overridden the :
>
> resolveErrorMessage and setIoErrorStream(IoOutputStream errStream)
> {code:java}
> @Override
> public void setIoErrorStream(IoOutputStream errStream) {
> this.errStream = errStream;
> }
> {code}
> finally we are writing to the error stream:
> {code:java}
> private void writeMsgToErrorStream(String refinedUserExitMessage) {
> ByteArrayBuffer buf = new ByteArrayBuffer();
> buf.putString(refinedUserExitMessage +
> System.getProperty("line.separator"));
> try { if (errStream != null) {
> errStream.writeBuffer(buf);
> }
> } catch (Exception e) {
> }
> }
> {code}
> Once the data is written to error stream we are gettig proper message to the
> console:
> !image-2021-08-19-12-50-01-922.png!
> But there is an extra charater getting appended at the first character *<*
> Utils.java ....
> I have no idea from where this *<* is coming from, and that changes with the
> first character like if it is P it would be *>, when starting with S it gets
> appended with Z*
> Any help will be appreciated.
> Thanks,
> Susmit
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]