Jump to content

Double try/catch block on export of plugin. How to avoid?


TSP

Recommended Posts

Hi, 

On exporting a plugin I experience that it exports it with a double try/catch-block

<?php
	public function commentFormElements()
	{
		try
		{
			try
			{
				// My code
			}
			catch ( \RuntimeException $e )
			{
				if ( method_exists( get_parent_class(), __FUNCTION__ ) )
				{
					return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() );
				}
				else
				{
					throw $e;
				}
			}
		}
		catch ( \RuntimeException $e )
		{
			if ( method_exists( get_parent_class(), __FUNCTION__ ) )
			{
				return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() );
			}
			else
			{
				throw $e;
			}
		}
	}

How to avoid this?

Okay, totally my bad. For some reason the try/catch-code is actually in the dev code. 

I don't remember putting it there though. 

I guess I can just remove it from the dev code for the plugin, right?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...