コード例 #1
0
ファイル: LibraryServices.cs プロジェクト: piotrkopec/Dynamo
        private void LibraryLoadFailureHandler(object sender, LibraryLoadFailedEventArgs args)
        {
            LibraryLoadFailedException ex = new LibraryLoadFailedException(args.LibraryPath, args.Reason);

            Log(ex.Message, WarningLevel.Moderate);
            throw ex;
        }
コード例 #2
0
ファイル: LibraryServices.cs プロジェクト: undeadinu/Dynamo
        private void LibraryLoadFailureHandler(object sender, LibraryLoadFailedEventArgs args)
        {
            LibraryLoadFailedException ex = new LibraryLoadFailedException(args.LibraryPath, args.Reason);

            Log(ex.Message, WarningLevel.Moderate);

            // NOTE: We do not want to throw an exception here if the failure was due
            // to a missing library that was explicitly (attempted to be) loaded
            // but was moved or deleted OR if a .DS file with syntax error(s) is loaded
            if (args.ThrowOnFailure)
            {
                throw ex;
            }
        }