From a9813ab44d41abfdb8fb3d90d5b76785bedc4380 Mon Sep 17 00:00:00 2001 From: Eugene Tarassov Date: Thu, 20 Jun 2019 11:33:20 -0700 Subject: TCF Core: better reporting of invalid escape sequence in TCF channel --- .../org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java index c527b0163..15f52edf1 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/StreamChannel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others. + * Copyright (c) 2007-2019 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -114,8 +114,7 @@ public abstract class StreamChannel extends AbstractChannel { } break; default: - if (n < 0) return EOS; - assert false; + throw new IOException("Invalid escape sequence: " + ESC + " " + n); } } } -- cgit v1.2.3