Skip to content

Commit

Permalink
Fixed private member access exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobMisirian committed Aug 27, 2016
1 parent 66b9a90 commit c39b329
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Hassium/Runtime/InternalException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Hassium.Runtime
{
public class InternalException : Exception
{
public static string ATTRIBUTE_ACCESS = "Could not access private member {0} from {1}!";
public static string ATTRIBUTE_ACCESS = "Could not access private member!";
public static string ATTRIBUTE_NOT_FOUND = "Could not find attribute {0} in {1}!";
public static string CONVERSION_ERROR = "Could not convert {0} to {1}!";
public static string KEY_NOT_FOUND_ERROR = "Could not find key \"{0}\"!";
Expand Down
2 changes: 1 addition & 1 deletion src/Hassium/Runtime/VirtualMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public HassiumObject ExecuteMethod(HassiumMethod method)
if (attribute.IsPrivate)
{
if (method.Parent != val)
throw new InternalException(this, InternalException.ATTRIBUTE_ACCESS, ((HassiumMethod)attribute).Name, attribute.Parent.Name);
throw new InternalException(this, InternalException.ATTRIBUTE_ACCESS);
}
if (attribute is HassiumProperty)
Stack.Push(((HassiumProperty)attribute).Get.Invoke(this));
Expand Down

0 comments on commit c39b329

Please sign in to comment.