NPlant.Generation.NPlantImage.CreateException C# (CSharp) 메소드

CreateException() 개인적인 메소드

private CreateException ( Exception exception ) : string
exception System.Exception
리턴 string
        private string CreateException(Exception exception)
        {
            Win32Exception win32 = exception as Win32Exception;

            if (win32 != null)
            {
                if (! File.Exists(_javaPath))
                {
                    if (Path.IsPathRooted(_javaPath))
                    {
                        return "It appears the path to your local JRE installation is specified incorrectly in Options -> Settings.  '{0}' could not be found.".FormatWith(_javaPath);
                    }

                    return "It appears the exact location of your JRE installation is not specified in your Options -> Settings.  This tool assumes java.exe is in your system PATH if not otherwise specified in your settings.  Either add java.exe to your path, or explicitly specify where we can find java.exe.  If you don't have the Java JRE installed, use the Help menu to go get it.";
                }
            }

            StringBuilder buffer = new StringBuilder();
            buffer.AppendLine("Failed to invoke plant uml.  See the inner exception for more details.  Messages:");

            Exception ex = exception;

            while (ex != null)
            {
                buffer.AppendLine(ex.Message);
                ex = ex.InnerException;
            }

            return buffer.ToString();
        }