Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 461)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h	(revision 465)
@@ -1,4 +1,5 @@
 #pragma once
 
+#include <Messenger.h>
 #include <CodeGenerator.h>
 #include <NamespaceSupporter.h>
@@ -85,4 +86,8 @@
 		return namespaceSupporter;
 	}
+
+	// メッセンジャー
+	Messenger messenger;
+	ErrorMessenger errorMessenger;
 
 	// コード生成機構
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Messenger.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Messenger.h	(revision 465)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Messenger.h	(revision 465)
@@ -0,0 +1,74 @@
+
+class Messenger
+{
+public:
+	void Output( const std::string &message );
+	int GetNextErrorLine();
+};
+
+class ErrorInfo
+{
+	int errorCode;
+	std::string keyword;
+	std::string sourceFilePath;
+	int sourceLineNum;
+	int errorLineNum;
+
+public:
+	ErrorInfo( int errorCode, const std::string &keyword, const std::string &sourceFilePath, int sourceLineNum )
+		: errorCode( errorCode )
+		, keyword( keyword )
+		, sourceFilePath( sourceFilePath )
+		, sourceLineNum( sourceLineNum )
+	{
+	}
+	ErrorInfo( int errorCode, const std::string &keyword, int sourceIndex );
+
+	int GetErrorCode() const
+	{
+		return errorCode;
+	}
+	bool IsWarning() const
+	{
+		return ( errorCode < -100 );
+	}
+	const std::string &GetKeyword() const
+	{
+		return keyword;
+	}
+	const std::string &GetSourceFilePath() const
+	{
+		return sourceFilePath;
+	}
+	int GetSourceLineNum() const
+	{
+		return sourceLineNum;
+	}
+	int GetErrorLineNum() const
+	{
+		return errorLineNum;
+	}
+
+	std::string GetMessageString() const;
+	std::string GetFullMessageString() const;
+};
+typedef std::vector<ErrorInfo> ErrorInfos;
+
+class ErrorMessenger
+	: public Messenger
+{
+	ErrorInfos errorInfos;
+	Jenga::Common::Strings synonymKeyWords;
+
+public:
+	void Output( const ErrorInfo &errorInfo );
+	void Output( int errorCode, const std::string &keyword, int sourceIndex );
+	void Output( int errorCode, const char *keyword, int sourceIndex );
+	void OutputFatalError();
+
+	int GetErrorCount() const;
+	bool HasError() const;
+	int GetWarningCount() const;
+
+	void ShowErrorLine( int errorLineNum );
+};
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h	(revision 461)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h	(revision 465)
@@ -5,5 +5,4 @@
 class UserProc;
 class CClass;
-void SetError();
 
 class CMethod : public MemberPrototype
@@ -175,12 +174,24 @@
 	}
 
-	virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier ){SetError();return false;}
-
-	virtual bool IsAbstract() const{SetError();return false;}
-	virtual void SetAbstractMark( bool isAbstract ){SetError();}
+	virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier )
+	{
+		throw;
+	}
+
+	virtual bool IsAbstract() const
+	{
+		throw;
+	}
+	virtual void SetAbstractMark( bool isAbstract )
+	{
+		throw;
+	}
 	virtual bool IsVirtual() const{
 		return false;
 	}
-	virtual bool IsConst() const{SetError();return false;}
+	virtual bool IsConst() const
+	{
+		throw;
+	}
 	virtual bool IsDynamic() const
 	{
@@ -191,6 +202,12 @@
 		return true;
 	}
-	virtual const CClass *GetInheritsClassPtr() const{SetError();return NULL;}
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass ){SetError();}
+	virtual const CClass *GetInheritsClassPtr() const
+	{
+		throw;
+	}
+	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
+	{
+		throw;
+	}
 	virtual bool IsNotUse() const
 	{
@@ -199,5 +216,5 @@
 	virtual void SetNotUseMark( bool isNotUse )
 	{
-		SetError();
+		throw;
 	}
 };
Index: trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h	(revision 461)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h	(revision 465)
@@ -119,45 +119,10 @@
 		return lpValue;
 	}
-	const ::DllProc &GetDllProc() const
-	{
-		if( type != Schedule::DllProc )
-		{
-			SetError();
-		}
-		return *pDllProc;
-	}
-	const ::UserProc &GetUserProc() const
-	{
-		if( !( type == Schedule::UserProc || type == Schedule::AddressOf || type == Schedule::CatchAddress ) )
-		{
-			SetError();
-		}
-		return *pUserProc;
-	}
-	const ::CClass &GetClass() const
-	{
-		if( !( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ) )
-		{
-			SetError();
-		}
-		return *pClass;
-	}
-
-	void SpecifyAddressOf()
-	{
-		if( type != Schedule::UserProc )
-		{
-			SetError();
-		}
-		type = Schedule::AddressOf;
-	}
-	void SpecifyCatchAddress()
-	{
-		if( type != Schedule::UserProc )
-		{
-			SetError();
-		}
-		type = Schedule::CatchAddress;
-	}
+	const ::DllProc &GetDllProc() const;
+	const ::UserProc &GetUserProc() const;
+	const ::CClass &GetClass() const;
+
+	void SpecifyAddressOf();
+	void SpecifyCatchAddress();
 };
 typedef std::vector<Schedule> Schedules;
