mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 08:37:24 +01:00 
			
		
		
		
	Plugin/Plang: fix run-time unhandled exception error reporting
This commit is contained in:
		
							parent
							
								
									02a600fa32
								
							
						
					
					
						commit
						3f5a11e608
					
				@ -93,6 +93,7 @@ sub unload {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    $self->{pbot}->{commands}->unregister('plang');
 | 
			
		||||
    $self->{pbot}->{commands}->unregister('plangrepl');
 | 
			
		||||
    delete $INC{"Plang/Interpreter.pm"};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub cmd_plang {
 | 
			
		||||
@ -114,7 +115,7 @@ sub cmd_plang {
 | 
			
		||||
 | 
			
		||||
    if (my $exception = $@) {
 | 
			
		||||
        $exception = $self->{plang}->{interpreter}->output_value($exception);
 | 
			
		||||
        $self->{output} .= "Run-time error: unhandled exception: $exception";
 | 
			
		||||
        $self->{output} .= $exception;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # return the output
 | 
			
		||||
 | 
			
		||||
@ -25,7 +25,7 @@ use PBot::Imports;
 | 
			
		||||
# These are set by the /misc/update_version script
 | 
			
		||||
use constant {
 | 
			
		||||
    BUILD_NAME     => "PBot",
 | 
			
		||||
    BUILD_REVISION => 4443,
 | 
			
		||||
    BUILD_REVISION => 4444,
 | 
			
		||||
    BUILD_DATE     => "2022-01-18",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user