SetProp()

Namespace ›› System ›› MfException ›› Methods ››
Parent Previous Next

SetProp()

Helper method to set basic properties if MfException.

instance.SetProp()
instance.SetProp(file)
instance.SetProp(file, line)
instance.SetProp(file, line, source)

SetProp()

Sets File to MfString.Empty.
Sets Line to 0.
Sets Source to null.

SetProp(file)

Sets File to the value of file
Line is unchanged.
Source is unchanged.

SetProp(file, line)

Sets File to the value of file.
Sets Line to the value of line.
Source is unchanged.

SetProp(file, line, source)

Sets File to the value of file.
Sets Line to the value of line.
Sets Source to the value of source.

Parameters

file

Sets the value of the File property. If Null value then File is set to MfString.Empty.

line

Sets the value of the Line property. If Null value then Line is set to 0;

source

Sets the value of the Source property. If Null Value then source is set to Null

Throws

Throws MfArgumentException if there is an error setting a Argument value to a Property

Example

if(!this.IsObjInstance(obj, MfString))
{
       err := new MfArgumentException(MfEnvironment.Instance.GetResourceString("Argument_Object_Equals"),"obj")
       err.SetProp(A_LineFile, A_LineNumber, A_ThisFunc) ; set File, Line and Source Properties
       throw err
}