예제 #1
0
 internal QueryTalkException(
     object exceptionCreator,
     QueryTalkExceptionType exceptionType,
     string arguments,
     string method = null)
 {
     _hasReport          = true;
     _exceptionType      = exceptionType;
     _exceptionAttribute = exceptionType.GetAttributeOfType <ExceptionAttribute>();
     _arguments          = arguments ?? Text.NotAvailable;
     _tip    = _exceptionAttribute.Tip;
     _method = method;
 }
예제 #2
0
 private static QueryTalkException CreateException(QueryTalkExceptionType exceptionType, string variable)
 {
     return(new QueryTalkException("TableArgument.Build", exceptionType,
                                   String.Format("variable = {0}", variable)));
 }
예제 #3
0
 internal static QueryTalkException InvalidVariableException(string variable, QueryTalkExceptionType exceptionType)
 {
     return(new QueryTalkException("Variable.InvalidVariableTypeException",
                                   exceptionType, String.Format("variable = {0}", variable)));
 }
예제 #4
0
 private QueryTalkException JoinerException(TableChainer source, TableChainer target, QueryTalkExceptionType exceptionType)
 {
     if (target != null)
     {
         return(new QueryTalkException(this, exceptionType,
                                       String.Format("joining table {5}= {0} AS {1}{2}   target table {6}= {3} AS {4}",
                                                     source.TableArgument.Build(_buildContext, _buildArgs), Filter.Delimit(source.Alias.Name),
                                                     Environment.NewLine, target.TableArgument.Build(_buildContext, _buildArgs), Filter.Delimit(target.Alias.Name),
                                                     (source.Node == null) ? "(INVALID) " : null, (target != null && target.Node == null) ? "(INVALID) " : null
                                                     ),
                                       Text.Method.By));
     }
     else
     {
         return(new QueryTalkException(this, exceptionType,
                                       String.Format("joining table = {0} AS {1}",
                                                     source.TableArgument.Build(_buildContext, _buildArgs), Filter.Delimit(source.Alias.Name)),
                                       Text.Method.By));
     }
 }
예제 #5
0
 private QueryTalkException JoinerException(TableChainer source, string alias, QueryTalkExceptionType exceptionType)
 {
     return(new QueryTalkException(this, exceptionType,
                                   String.Format("joining table = {0} AS {1}{2}   alias of target table = {3}",
                                                 source.TableArgument.Build(_buildContext, _buildArgs), Filter.Delimit(source.Alias.Name),
                                                 Environment.NewLine, Filter.Delimit(alias)),
                                   Text.Method.By));
 }
예제 #6
0
 internal void CreateException(QueryTalkExceptionType exceptionType, string arguments, string method = null)
 {
     chainException        = new QueryTalkException(this, exceptionType, arguments);
     chainException.Method = method ?? Method;
 }
예제 #7
0
 internal void Throw(QueryTalkExceptionType exceptionType, string arguments, string method = null)
 {
     TryThrow(new QueryTalkException(this, exceptionType, arguments), method ?? Method);
 }
예제 #8
0
 private static void _Throw(QueryTalkExceptionType exceptionType, string arguments, string method)
 {
     throw new QueryTalkException("d.Throw", exceptionType, arguments, method);
 }