2 * error.cpp: ErrorEventArgs and its subclasses
5 * Moonlight List (moonlight-list@lists.ximian.com)
7 * Copyright 2007 Novell, Inc. (http://www.novell.com)
9 * See the LICENSE file included with the distribution for details.
17 #include "eventargs.h"
23 MoonError::MoonError ()
25 number
= (ExceptionType
) 0;
33 MoonError::MoonError (ExceptionType type
, int code
, const char *message
)
37 this->message
= g_strdup (message
);
43 MoonError::MoonError (const MoonError
&e
)
47 message
= g_strdup (e
.message
);
48 char_position
= e
.char_position
;
49 line_number
= e
.line_number
;
50 gchandle_ptr
= e
.gchandle_ptr
;
53 MoonError::~MoonError ()
68 MoonError::operator= (const MoonError
& other
)
70 number
= other
.number
;
72 message
= g_strdup (other
.message
);
73 char_position
= other
.char_position
;
74 line_number
= other
.line_number
;
75 gchandle_ptr
= other
.gchandle_ptr
;
80 MoonError::FillIn (MoonError
*error
, ExceptionType number
, int code
, const char *message
)
85 error
->number
= number
;
87 error
->message
= g_strdup (message
);
91 MoonError::FillIn (MoonError
*error
, ExceptionType type
, const char *message
)
96 FillIn (error
, type
, 0, message
);
101 MoonError::FillIn (MoonError
*error
, ParserErrorEventArgs
*error_args
)
105 FillIn (error
, MoonError::XAML_PARSE_EXCEPTION
, error_args
->GetErrorMessage());
106 error
->char_position
= error_args
->char_position
;
107 error
->line_number
= error_args
->line_number
;