Skip to content

Throw exception when finding malformed PostDoc #57

@grahamboree

Description

@grahamboree

Currently, a malformed PostDoc like the following will set the resulting value to null.

public class Test {
    public int value;

    // Invalid because we expect this to return a Test instance
    public void PostDoc(Test existing) {
        if (existing.value > 42) {
            throw new Exception("Value too high!");
        }
    }
}

...

DocNode Doc = ...;
Test readValue = Doc.As<Test>(); // This is always set to null

DarkConfig should throw an exception when scanning for PostDoc functions and finding one with a signature that doesn't match what it's expecting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛bugClearly not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions