utl_err.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 1,310 行 · 第 1/4 页

CPP
1,310
字号
    return "Missing '{' or illegal syntax following support spec";
  case IDL_GlobalData::PS_ManagesSeen:
    return "Missing component identifier following MANAGES keyword";
  case IDL_GlobalData::PS_ManagesIDSeen:
    return "Illegal syntax following managed component identifier";
  case IDL_GlobalData::PS_PrimaryKeySpecSeen:
    return "Illegal syntax following primary key spec";
  case IDL_GlobalData::PS_InterfaceSeen:
    return "Missing interface identifier following INTERFACE keyword";
  case IDL_GlobalData::PS_InterfaceForwardSeen:
    return "Missing ';' following forward interface declaration";
  case IDL_GlobalData::PS_InterfaceIDSeen:
    return "Missing '{' or illegal syntax following interface identifier";
  case IDL_GlobalData::PS_InterfaceSqSeen:
    return "Illegal syntax following interface '{' opener";
  case IDL_GlobalData::PS_InterfaceQsSeen:
    return "Illegal syntax following interface '}' closer";
  case IDL_GlobalData::PS_InterfaceBodySeen:
    return "Illegal syntax following interface body statement(s)";
  case IDL_GlobalData::PS_ValueTypeSeen:
    return "Missing interface identifier following VALUETYPE keyword";
  case IDL_GlobalData::PS_ValueTypeForwardSeen:
    return "Missing ';' following forward value type declaration";
  case IDL_GlobalData::PS_ValueTypeIDSeen:
    return "Missing '{' or illegal syntax following value type identifier";
  case IDL_GlobalData::PS_ValueTypeSqSeen:
    return "Illegal syntax following value type '{' opener";
  case IDL_GlobalData::PS_ValueTypeQsSeen:
    return "Illegal syntax following value type '}' closer";
  case IDL_GlobalData::PS_ValueTypeBodySeen:
    return "Illegal syntax following value type body statement(s)";
  case IDL_GlobalData::PS_EventTypeSeen:
    return "Missing interface identifier following EVENTTYPE keyword";
  case IDL_GlobalData::PS_EventTypeForwardSeen:
    return "Missing ';' following forward event type declaration";
  case IDL_GlobalData::PS_EventTypeIDSeen:
    return "Missing '{' or illegal syntax following event type identifier";
  case IDL_GlobalData::PS_EventTypeSqSeen:
    return "Illegal syntax following event type '{' opener";
  case IDL_GlobalData::PS_EventTypeQsSeen:
    return "Illegal syntax following event type '}' closer";
  case IDL_GlobalData::PS_EventTypeBodySeen:
    return "Illegal syntax following event type body statement(s)";
  case IDL_GlobalData::PS_ComponentSeen:
    return "Missing component identifier following COMPONENT keyword";
  case IDL_GlobalData::PS_ComponentForwardSeen:
    return "Missing ';' following forward component declaration";
  case IDL_GlobalData::PS_ComponentIDSeen:
    return "Missing '{' or illegal syntax following component identifier";
  case IDL_GlobalData::PS_ComponentSqSeen:
    return "Illegal syntax following component '{' opener";
  case IDL_GlobalData::PS_ComponentQsSeen:
    return "Illegal syntax following component '}' closer";
  case IDL_GlobalData::PS_ComponentBodySeen:
    return "Illegal syntax following component body statement(s)";
  case IDL_GlobalData::PS_HomeSeen:
    return "Missing component identifier following HOME keyword";
  case IDL_GlobalData::PS_HomeIDSeen:
    return "Missing '{' or illegal syntax following home identifier";
  case IDL_GlobalData::PS_HomeSqSeen:
    return "Illegal syntax following home '{' opener";
  case IDL_GlobalData::PS_HomeQsSeen:
    return "Illegal syntax following home '}' closer";
  case IDL_GlobalData::PS_HomeBodySeen:
    return "Illegal syntax following home body statement(s)";
  case IDL_GlobalData::PS_StructForwardSeen:
    return "Missing ';' following forward struct declaration";
  case IDL_GlobalData::PS_UnionForwardSeen:
    return "Missing ';' following forward union declaration";
  case IDL_GlobalData::PS_SNListCommaSeen:
    return "Found illegal scoped name in scoped name list";
  case IDL_GlobalData::PS_ScopedNameSeen:
    return "Missing ',' following scoped name in scoped name list";
  case IDL_GlobalData::PS_SN_IDSeen:
    return "Illegal component in scoped name";
  case IDL_GlobalData::PS_ScopeDelimSeen:
    return "Illegal component in scoped name following '::'";
  case IDL_GlobalData::PS_ConstSeen:
    return "Missing type or illegal syntax following CONST keyword";
  case IDL_GlobalData::PS_ConstTypeSeen:
    return "Missing identifier or illegal syntax following const type";
  case IDL_GlobalData::PS_ConstIDSeen:
    return "Missing '=' or illegal syntax after const identifier";
  case IDL_GlobalData::PS_ConstAssignSeen:
    return "Missing value expr or illegal syntax following '='";
  case IDL_GlobalData::PS_ConstExprSeen:
    return "Missing ';' or illegal syntax following value expr in const";
  case IDL_GlobalData::PS_TypedefSeen:
    return "Missing type or illegal syntax following TYPEDEF keyword";
  case IDL_GlobalData::PS_TypeSpecSeen:
    return "Missing declarators or illegal syntax following type spec";
  case IDL_GlobalData::PS_DeclaratorsSeen:
    return "Illegal syntax following declarators in TYPEDEF declaration";
  case IDL_GlobalData::PS_StructSeen:
    return "Missing struct identifier following STRUCT keyword";
  case IDL_GlobalData::PS_StructIDSeen:
    return "Missing '{' or illegal syntax following struct identifier";
  case IDL_GlobalData::PS_StructSqSeen:
    return "Illegal syntax following struct '{' opener";
  case IDL_GlobalData::PS_StructQsSeen:
    return "Illegal syntax following struct '}' closer";
  case IDL_GlobalData::PS_StructBodySeen:
    return "Illegal syntax following struct body statement(s)";
  case IDL_GlobalData::PS_MemberTypeSeen:
    return "Illegal syntax or missing identifier following member type";
  case IDL_GlobalData::PS_MemberDeclsSeen:
    return "Illegal syntax following member declarator(s)";
  case IDL_GlobalData::PS_MemberDeclsCompleted:
    return "Missing ',' between member decls of same type(?)";
  case IDL_GlobalData::PS_UnionSeen:
    return "Missing identifier following UNION keyword";
  case IDL_GlobalData::PS_UnionIDSeen:
    return "Illegal syntax following union identifier";
  case IDL_GlobalData::PS_SwitchSeen:
    return "Illegal syntax following SWITCH keyword";
  case IDL_GlobalData::PS_SwitchOpenParSeen:
    return "Illegal syntax following '(' in switch in union";
  case IDL_GlobalData::PS_SwitchTypeSeen:
    return "Illegal syntax following type decl in switch in union";
  case IDL_GlobalData::PS_SwitchCloseParSeen:
    return "Missing union '{' opener";
  case IDL_GlobalData::PS_UnionSqSeen:
    return "Illegal syntax following union '{' opener";
  case IDL_GlobalData::PS_UnionQsSeen:
    return "Illegal syntax following union '}' closer";
  case IDL_GlobalData::PS_DefaultSeen:
    return "Illegal syntax or missing ':' following DEFAULT keyword";
  case IDL_GlobalData::PS_UnionLabelSeen:
    return "Illegal syntax following branch label in union";
  case IDL_GlobalData::PS_LabelColonSeen:
    return "Illegal syntax following ':' in branch label in union";
  case IDL_GlobalData::PS_LabelExprSeen:
    return "Illegal syntax following label expression in union";
  case IDL_GlobalData::PS_UnionElemSeen:
  case IDL_GlobalData::PS_UnionElemCompleted:
    return "Illegal syntax following union element";
  case IDL_GlobalData::PS_CaseSeen:
    return "Illegal syntax following CASE keyword in union";
  case IDL_GlobalData::PS_UnionElemTypeSeen:
    return "Illegal syntax following type decl in union element";
  case IDL_GlobalData::PS_UnionElemDeclSeen:
    return "Illegal syntax following declarator in union element";
  case IDL_GlobalData::PS_UnionBodySeen:
    return "Illegal syntax following union body statement(s)";
  case IDL_GlobalData::PS_EnumSeen:
    return "Illegal syntax or missing identifier following ENUM keyword";
  case IDL_GlobalData::PS_EnumIDSeen:
    return "Illegal syntax or missing '{' following enum identifier";
  case IDL_GlobalData::PS_EnumSqSeen:
    return "Illegal syntax following enum '{' opener";
  case IDL_GlobalData::PS_EnumQsSeen:
    return "Illegal syntax following enum '}' closer";
  case IDL_GlobalData::PS_EnumBodySeen:
    return "Illegal syntax following enum body statement(s)";
  case IDL_GlobalData::PS_EnumCommaSeen:
    return "Illegal syntax or missing identifier following ',' in enum";
  case IDL_GlobalData::PS_SequenceSeen:
    return "Illegal syntax or missing '<' following SEQUENCE keyword";
  case IDL_GlobalData::PS_SequenceSqSeen:
    return "Illegal syntax or missing type following '<' in sequence";
  case IDL_GlobalData::PS_SequenceQsSeen:
    return "Illegal syntax following '>' in sequence";
  case IDL_GlobalData::PS_SequenceTypeSeen:
    return "Illegal syntax following sequence type declaration";
  case IDL_GlobalData::PS_SequenceCommaSeen:
    return "Illegal syntax or missing size expr following ',' in sequence";
  case IDL_GlobalData::PS_SequenceExprSeen:
    return "Illegal syntax or missing '>' following size expr in sequence";
  case IDL_GlobalData::PS_StringSeen:
    return "Illegal syntax or missing '<' following STRING keyword";
  case IDL_GlobalData::PS_StringSqSeen:
    return "Illegal syntax or missing size expr following '<' in string";
  case IDL_GlobalData::PS_StringQsSeen:
    return "Illegal syntax following '>' in string";
  case IDL_GlobalData::PS_StringExprSeen:
    return "Illegal syntax or missing '>' after size expr in string";
  case IDL_GlobalData::PS_StringCompleted:
    return "Illegal syntax after string declaration";
  case IDL_GlobalData::PS_ArrayIDSeen:
    return "Illegal syntax or missing dimensions after array identifier";
  case IDL_GlobalData::PS_ArrayCompleted:
    return "Illegal syntax after array declaration";
  case IDL_GlobalData::PS_DimSqSeen:
    return "Illegal syntax or missing size expr after '[' in array declaration";
  case IDL_GlobalData::PS_DimQsSeen:
    return "Illegal syntax after ']' in array declaration";
  case IDL_GlobalData::PS_DimExprSeen:
    return "Illegal syntax or missing ']' after size expr in array declaration";
  case IDL_GlobalData::PS_AttrROSeen:
    return "Illegal syntax after READONLY keyword";
  case IDL_GlobalData::PS_AttrSeen:
    return "Illegal syntax after ATTRIBUTE keyword";
  case IDL_GlobalData::PS_AttrTypeSeen:
    return "Illegal syntax after type in attribute declaration";
  case IDL_GlobalData::PS_AttrDeclsSeen:
    return "Illegal syntax after attribute declarators";
  case IDL_GlobalData::PS_AttrCompleted:
    return "Illegal syntax after attribute declaration";
  case IDL_GlobalData::PS_ExceptSeen:
    return "Illegal syntax or missing identifier after EXCEPTION keyword";
  case IDL_GlobalData::PS_ExceptIDSeen:
    return "Illegal syntax or missing '{' after exception identifier";
  case IDL_GlobalData::PS_ExceptSqSeen:
    return "Illegal syntax after exception '{' opener";
  case IDL_GlobalData::PS_ExceptQsSeen:
    return "Illegal syntax after exception '}' closer";
  case IDL_GlobalData::PS_ExceptBodySeen:
    return "Illegal syntax after exception body statement(s)";
  case IDL_GlobalData::PS_OpAttrSeen:
    return "Illegal syntax or missing type after operation attribute";
  case IDL_GlobalData::PS_OpTypeSeen:
    return "Illegal syntax or missing identifier after operation type";
  case IDL_GlobalData::PS_OpIDSeen:
    return "Illegal syntax or missing '(' after operation identifier";
  case IDL_GlobalData::PS_OpParsCompleted:
    return "Illegal syntax after operation parameter list";
  case IDL_GlobalData::PS_OpRaiseCompleted:
    return "Illegal syntax after optional RAISES in operation declaration";
  case IDL_GlobalData::PS_OpGetRaiseCompleted:
    return "Illegal syntax after optional GETRAISES in operation declaration";
  case IDL_GlobalData::PS_OpSetRaiseCompleted:
    return "Illegal syntax after optional SETRAISES in operation declaration";
  case IDL_GlobalData::PS_OpContextCompleted:
    return "Illegal syntax after optional CONTEXT in operation declaration";
  case IDL_GlobalData::PS_OpCompleted:
    return "Illegal syntax after operation declaration";
  case IDL_GlobalData::PS_OpSqSeen:
    return "Illegal syntax after operation parameter list '(' opener";
  case IDL_GlobalData::PS_OpQsSeen:
    return "Illegal syntax after operation parameter list ')' closer";
  case IDL_GlobalData::PS_OpParCommaSeen:
    return "Illegal syntax or missing direction in parameter declaration";
  case IDL_GlobalData::PS_OpParDirSeen:
    return "Illegal syntax or missing type in parameter declaration";
  case IDL_GlobalData::PS_OpParTypeSeen:
    return "Illegal syntax or missing declarator in parameter declaration";
  case IDL_GlobalData::PS_OpParDeclSeen:
    return "Illegal syntax following parameter declarator";
  case IDL_GlobalData::PS_OpRaiseSeen:
    return "Illegal syntax or missing '(' after RAISES keyword";
  case IDL_GlobalData::PS_OpRaiseSqSeen:
    return "Illegal syntax after RAISES '(' opener";
  case IDL_GlobalData::PS_OpRaiseQsSeen:
    return "Illegal syntax after RAISES ')' closer";
  case IDL_GlobalData::PS_OpGetRaiseSeen:
    return "Illegal syntax or missing '(' after GETRAISES keyword";
  case IDL_GlobalData::PS_OpGetRaiseSqSeen:
    return "Illegal syntax after GETRAISES '(' opener";
  case IDL_GlobalData::PS_OpGetRaiseQsSeen:
    return "Illegal syntax after GETRAISES ')' closer";
  case IDL_GlobalData::PS_OpSetRaiseSeen:
    return "Illegal syntax or missing '(' after SETRAISES keyword";
  case IDL_GlobalData::PS_OpSetRaiseSqSeen:
    return "Illegal syntax after SETRAISES '(' opener";
  case IDL_GlobalData::PS_OpSetRaiseQsSeen:
    return "Illegal syntax after SETRAISES ')' closer";
  case IDL_GlobalData::PS_OpContextSeen:
    return "Illegal syntax or missing '(' after CONTEXT keyword";
  case IDL_GlobalData::PS_OpContextSqSeen:
    return "Illegal syntax after CONTEXT '(' opener";
  case IDL_GlobalData::PS_OpContextQsSeen:
    return "Illegal syntax after CONTEXT ')' closer";
  case IDL_GlobalData::PS_OpContextCommaSeen:
    return "Illegal syntax after ',' in CONTEXT in operation declaration";
  case IDL_GlobalData::PS_DeclsCommaSeen:
    return "Illegal syntax after ',' in declarators list";
  case IDL_GlobalData::PS_DeclsDeclSeen:
    return "Illegal syntax after declarator in declarators list";
  case IDL_GlobalData::PS_PragmaPrefixSyntax:
    return "Illegal syntax for #pragma prefix";
  default:
    return "Some syntax error";
  }
}

// Public methods.

// Report error messages with various numbers of arguments.

void
UTL_Error::syntax_error (IDL_GlobalData::ParseState ps)
{
  idl_error_header (EIDL_SYNTAX_ERROR,
                    idl_global->lineno (),
                    idl_global->filename ());
  ACE_ERROR ((LM_ERROR,
              "%s\n",
              parse_state_to_error_message (ps)));
  idl_global->set_err_count (idl_global->err_count () + 1);
}

void
UTL_Error::error0 (UTL_Error::ErrorCode c)
{
  idl_error_header (c,
                    idl_global->lineno (),
                    idl_global->filename ());
  ACE_ERROR ((LM_ERROR,
              "\n"));
  idl_global->set_err_count (idl_global->err_count () + 1);
}

void
UTL_Error::error1 (UTL_Error::ErrorCode c,
                   AST_Decl *d)
{
  idl_error_header (c,
                    idl_global->lineno (),
                    idl_global->filename ());
  d->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
  ACE_ERROR ((LM_ERROR,
              "\n"));
  idl_global->set_err_count (idl_global->err_count () + 1);
}

void
UTL_Error::error2 (UTL_Error::ErrorCode c,
                   AST_Decl *d1,
                   AST_Decl *d2)
{
  idl_error_header (c,
                    idl_global->lineno (),
                    idl_global->filename ());
  d1->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
  ACE_ERROR ((LM_ERROR,
              ", "));
  d2->name ()->dump (*ACE_DEFAULT_LOG_STREAM);;
  ACE_ERROR ((LM_ERROR,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?