Exemplo n.º 1
0
        public void ThrowException(RuntimeIshtarClass @class, string message)
        {
            this.exception = new CallFrameException()
            {
                value = IshtarGC.AllocObject(@class)
            };

            if (@class.FindField("message") is null)
            {
                throw new InvalidOperationException($"Class '{@class.FullName}' is not contained 'message' field.");
            }

            this.exception.value->vtable[@class.Field["message"].vtable_offset]
                = IshtarMarshal.ToIshtarObject(message);
        }
Exemplo n.º 2
0
 public void ThrowException(RuntimeIshtarClass @class) =>
 this.exception = new CallFrameException()
 {
     value = IshtarGC.AllocObject(@class)
 };