Skip to content

Commit

Permalink
Fix #654 (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier authored Sep 19, 2019
1 parent 04160d1 commit dd38093
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Src/IronPython/Hosting/PythonCommandLine.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

#if FEATURE_FULL_CONSOLE

using System;
Expand All @@ -10,15 +11,17 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;

using Microsoft.Scripting;
using Microsoft.Scripting.Hosting.Shell;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;

using IronPython.Compiler;
using IronPython.Modules;
using IronPython.Runtime;
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Operations;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting.Shell;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;

namespace IronPython.Hosting {
/// <summary>
Expand Down Expand Up @@ -536,7 +539,7 @@ protected override int RunFile(string/*!*/ fileName) {
try {
result = RunFileWorker(fileName);
} catch (Exception e) {
Console.WriteLine(Language.FormatException(e), Style.Error);
UnhandledException(e);
}
} else {
result = RunFileWorker(fileName);
Expand Down Expand Up @@ -617,4 +620,5 @@ protected override void UnhandledException(Exception e) {

}
}

#endif

0 comments on commit dd38093

Please sign in to comment.