package com.mobify.astro;

import android.support.annotation.NonNull;
import android.view.View;

import com.mobify.astro.messaging.EventRegistrar;
import com.mobify.astro.messaging.MessageSender;

public class TestPluginThrowsAstroException  extends AstroPlugin {

    public class TestPluginException extends AstroException {
        public TestPluginException(String message) {
            super("TestPluginException" + ": " + message);
        }
    }
    private View view;

    public TestPluginThrowsAstroException(@NonNull AstroActivity activity, @NonNull PluginResolver pluginResolver,
                      @NonNull EventRegistrar eventRegistrar, @NonNull MessageSender messageSender) throws AstroException {
        super(activity, pluginResolver, eventRegistrar, messageSender);
        throw new TestPluginException("Test Astro Exception");
    }

    @Override
    public View getView() {
        return view;
    }
}
