Esempio n. 1
0
            public override string GetUserMessage(KernelException e)
            {
                KernelTransaction transaction = SafeAcquireTransaction(TransactionSupplier);

                using (Statement ignore = transaction.AcquireStatement())
                {
                    return(e.GetUserMessage(new SilentTokenNameLookup(transaction.TokenRead())));
                }
            }
Esempio n. 2
0
        public override string GetUserMessage(TokenNameLookup tokenNameLookup)
        {
            string message = "Unable to drop " + _constraint.userDescription(tokenNameLookup);

            if (Cause is KernelException)
            {
                KernelException cause = ( KernelException )Cause;

//JAVA TO C# CONVERTER TODO TASK: The following line has a Java format specifier which cannot be directly translated to .NET:
//ORIGINAL LINE: return String.format("%s:%n%s", message, cause.getUserMessage(tokenNameLookup));
                return(string.Format("%s:%n%s", message, cause.GetUserMessage(tokenNameLookup)));
            }
            return(message);
        }
        public override string GetUserMessage(TokenNameLookup tokenNameLookup)
        {
            string message = "Unable to create " + _constraint.prettyPrint(tokenNameLookup);

            if (!string.ReferenceEquals(_cause, null))
            {
//JAVA TO C# CONVERTER TODO TASK: The following line has a Java format specifier which cannot be directly translated to .NET:
//ORIGINAL LINE: message = String.format("%s:%n%s", message, cause);
                message = string.Format("%s:%n%s", message, _cause);
            }
            if (Cause is KernelException)
            {
                KernelException cause = ( KernelException )Cause;

//JAVA TO C# CONVERTER TODO TASK: The following line has a Java format specifier which cannot be directly translated to .NET:
//ORIGINAL LINE: return String.format("%s:%n%s", message, cause.getUserMessage(tokenNameLookup));
                return(string.Format("%s:%n%s", message, cause.GetUserMessage(tokenNameLookup)));
            }
            return(message);
        }