text:
This code errors on *this* and *that*, is it really written in them?
Inspired by I'm not the language you're looking for!
Challenge
Choose two different programming languages, and write a program that prints the following line to stdout (or equivalent):
This program errors out in <the current language> :P

and then generates different kind of error in each of the two languages.
Rules
Some rules are taken from the original challenge.

In the output, language names should exactly follow:

The name listed on TIO, optionally excluding the version number and/or the implementation name (e.g. if you use JavaScript (Node.js) as one of your languages, you can use JavaScript for your language name, but not JS or Javascript.)
The full name on the official website (or GitHub repo) if your language of choice is not available on TIO.

Neither program should take any input from the user.
You may use comments in either language.
Two different versions of the same language count as different languages.

If this is done, the program should output the major version number, and if running on two different minor versions, should report the minor version also.
You should not use prebuilt version functions (this includes variables that have already been evaluated at runtime).

Two different command line flags in the same language also count as different languages as per this meta consensus, as long as the flags don't include code fragments (such as -Dblahblah... in C).

If this is done, the program should also output the flag used.

Two errors are considered different unless both errors are generated by the same semantics (such as "division by zero", "segmentation fault", or "index out of range").

If a language's runtime does not exit after an error, but reports the error in some way to the user, it's a valid error.
If a language does not discriminate the error messages but has a known list of reasons that cause error, you must specify the reason, not the error message.
An example is ><>, which has only one error message something smells fishy..., but esolangs wiki page has a list of error reasons.

Syntax error is not allowed unless it is generated by calling eval() or similar.
Throwing something manually (via throw(JS), raise(Python), die(Perl) or similar) is allowed, but all of them are considered as one kind of error.
Error by invalid command in 2D or golflangs is also allowed (and treated as one kind of error).

Examples
Python and Ruby

Python: This program errors out in Python :P to stdout, then undefined identifier
Ruby: This program errors out in Ruby :P to stdout, then index out of bounds

C89 and C99

C89: This program errors out in C 89 :P to stdout, then division by zero
C99: This program errors out in C 99 :P to stdout, then segmentation fault

Note that the version number should always be separated from the language name by a space.
Python 2.7.9 and Python 2.7.10

Python 2.7.9: This program errors out in Python 2.7.9 :P to stdout, then syntax error on eval
Python 2.7.10: This program errors out in Python 2.7.10 :P to stdout, then key error on dict

Perl and Perl -n

Perl: This program errors out in Perl :P to stdout, then invalid time format
Perl -n: This program errors out in Perl -n :P to stdout, then try to open a file that doesn't exist

Winning condition
This is code-golf, so the shortest code in bytes wins. But you're always encouraged to post an answer that is fun or interesting even if it isn't very short.

Sandbox post (deleted)

Does the error need to halt the program?

I initially thought so. However, if there are some languages that may continue (possibly with undefined behavior) after something like "division by zero", with some mechanism to acknowledge that the program encountered that error, then I will happily allow that.

I think I already know the answer, but just in case: may the sentence This program errors out in ... contain mixed tabs/spaces instead of just spaces?

Related (print two different texts in two different languages).

Can there be trailing/leading whitespace printed as well?

Can the language names in the output be generated from built-in functions?

What about languages that are too old to have an official website or GitHub repository?

@KevinCruijssen Spaces only.

@ConorO'Brien Optional trailing newline is OK, everything else is not.

@TomCarpenter It's fine, as long as it fits the format.

@Mark I'll ask it on meta. That may be a future reference for any other challenges that want to involve the language name in some way.

@Mark had that exact case in my submission, I used what I considered "canonical" names with links to some informational websites -- hope this is fine.

Can we output to stderr? It is a default output method

Python 2 / Python 3, 60 bytes
print("This program errors out in Python %d :P"%(3/2*2))*1;a

Python 2 got NameError: name 'a' is not defined
Python 3 got unsupported operand type(s) for *: 'NoneType' and 'int'

Python 2:

/ is integer division, 3 / 2 got 1; int(3 / 2 * 2) is 2.
print is a statement, so the first statement read as print((...)*1), here *1 means repeating the string once.
second statement referenced a non-existing variable, which caused the error.
Try it online!

Python 3:

'/' is floating number division, 3 / 2 got 1.5; int(3 / 2 * 2) is 3.
print is a function, so the first statement read as (print(...))*1.
function print returns None; Multiplication do not work on None x int, so it report "unsupported operand".
Try it online!

C and C++, 114 101 bytes
-13 bytes thanks to l4m2!
#include<stdio.h>
main(){auto d=.5;printf("This program errors out in C%s :P",d?"++":"");2[&d]+=1/d;}

Segmentation fault in C++, floating point exception in C.
auto is defaulted to int in C so (int).5 becomes 0, so trying to divide by it is basically division by zero.
In C++ 1/d is 2, adding it to address of d and trying to change that address' value throws a segfault.
Try it in C++!
Try it in C!

Not sure if it helps, but if you can map C/C++ to 2 and 0, you could use "++"+n, where n is 0 for C++ and 2 for C

d?"++":"" 9 char, "++"+4*d 8 char.  But gets C/C++ backwards.  Sigh.

int main(){auto d=.5;printf("This program errors out in C%s :P",d?"++":"");2[&d]+=1/d;}(105) though I don't know why

Also int can be omitted

Suggest L"⬫"+!d instead of d?"++":""

JavaScript + HTML / HTML + JavaScript, 160 bytes

<!--
document.write`This program errors out in JavaScript + HTML :P`()
--><script>document.write`This program errors out in HTML + JavaScript :P`+X</script>

<!--
document.write`This program errors out in JavaScript + HTML :P`()
--><script>document.write`This program errors out in HTML + JavaScript :P`+X</script>

Not sure if this count two languages, but it is funny.

So, the former is undefined identifier, the latter is function call on a non-function type. Technically I'd consider the former HTML and the latter JavaScript, but really nice idea.

A good use of <!-- ... --> as single line comment markers (I know that this is in the spec for backward compatibility reasons)

><> and Foo, 42 bytes
#o<"This code errors in "p"Foo"'><>'" :P"/

Try it in ><>!
Try it in Foo!
Foo prints everything in ", as is well documented, and tries to divide by zero at the end. It ignores the '><>'.
><> pushes the "Foo" to the stack, but immediately pops it using p. After it prints everything to the stack with #o< it exits when the the stack is empty with the only error message it knows, something smells fishy...

Reason of the error is important, not the error message. The esolang page on ><> has a list of error reasons, so I believe you should specify one of them, not something smells fishy....

@Bubbler The error is caused by popping from an empty stack.

Using p to pop Foo is very clever!

Is the Foo code really an error, given that it appears to keep executing code after the divide by zero?

@pppery From the question body "If a language's runtime does not exit after an error, but reports the error in some way to the user, it's a valid error"

Java 8 & C99, 172 bytes
//\
interface a{static void main(String[]a){System.out.print("This program errors out in Java 8 :P");a[1]=""/*
main(n){{n=puts("This program errors out in C99 :P")/0/**/;}}

Based on my answer for the 'abc' and 'cba' challenge.
Try it in Java 8 - resulting in ArrayIndexOutOfBoundsException: 1.
Try it in C - resulting in Floating point exception: division by zero is undefined.
Explanation:
//\
interface a{static void main(String[]a){System.out.print("This program errors out in Java 8 :P");a[1]=""/*
main(n){{n=puts("This program errors out in C99 :P")/0/**/;}}

As you can see in the Java-highlighted code above, the first line is a comment due to //, and the C-code is a comment due to /* ... */, resulting in:
interface a{static void main(String[]a){System.out.print("This program errors out in Java 8 :P");a[1]="";}}

So it prints to STDOUT, and then tries to access the second program-argument (when none given), so it produces the ArrayIndexOutOfBoundsException.

//\
interface a{static void main(String[]a){System.out.print("This program errors out in Java 8 :P");a[1]=""/*
main(n){{n=puts("This program errors out in C99 :P")/0/**/;}}

Not sure how to correctly enable C-highlighting, because lang-c results in the same highlighting as Java.. But //\ will comment out the next line, which is the Java-code, resulting in:
main(n){{n=puts("This program errors out in C99 :P")/0;}}

So it prins to STDOUT, and then gives a division by zero error.

I think It will work with both C89 and C99. Don't hold me to that.

The // was added to C with C99.

Thanks to both of you, I've changed it to C99.

Why a[1] instead of a[0]?

@xehpuk No particular reason. It doesn't matter which digit I use and I had already filled in a 1 from the start. Could have used 0, 9, etc. as well. If I have something to edit about this post I will change it to 0 as well at the same time.

Java 8 & Whitespace, 439 431 428 408 bytes

 interface a{static void    main(String[]a){System.out.print("This program errors out"+
" in Java 8 :P");a[0]="";}}

Try it in Java 8 - resulting in ArrayIndexOutOfBoundsException: 0.
Try it in Whitespace - resulting in user error (Can't do Infix Plus).
Explanation:
Java 8:
interface a{static void main(String[]a){System.out.print("This program errors out"+
" in Java 8 :P");a[0]="";}}

So it prints to STDOUT, and then tries to access the first program-argument (when none given), so it produces the ArrayIndexOutOfBoundsException.

Whitespace:
[S S T  T   T   T   T   T   N
_Push_-31_P][S S T  T   T   S T S T N
_Push_-53_:][S S T  T   S S T   T   T   T   N
_Push_-79_space][S S T  T   S T S N
_Push_-10_e][S S T  T   T   S S N
_Push_-12_c][S S T  T   T   T   S N
_Push_-14_a][S S S T    N
_Push_1_p][S S S T  S S N
_Push_4_s][S S T    T   S T S N
_Push_-10_e][S S S T    S T N
_Push_5_t][S S T    T   T   S N
_Push_-6_i][S S T   T   T   T   N
_Push_-7_h][S S T   T   T   S S S N
_Push_-24_W][S T    S S T   S T S N
_Copy_0-based_10th_(-79_space)][S S T   T   N
_Push_-1_n][S S T   T   T   S N
_Push_-6_i][S T S S T   S N
_Copy_0-based_2nd_(-79_space)][S S S T  S T N
_Push_5_t][S S S T  T   S N
_Push_6_u][S S S N
_Push_0_o][S T  S S T   T   N
_Copy_0-based_3rd_(-79_space)][S S S T  S S N
_Push_4_s][S S S T  T   N
_Push_3_r][S S S N
_Push_0_o][S S S T  T   N
_Push_3_r][S N
S _Duplicate_top_(3_r)][S S T   T   S T S N
_Push_-10_e][S T    S S T   T   S N
_Copy_0-based_6th_(-79_space)][S S T    T   S N
_Push_-2_m][S S T   T   T   T   S N
_Push_-14_a][S S S T    T   N
_Push_3_r][S S T    T   S S S N
_Push_-8_g][S S S S (_Note_the_additional_S_here)N
_Push_0_o][S S S T  T   N
_Push_3_r][S S S T  N
_Push_1_p][S T  S S T   T   T   N
_Copy_0-based_7th_(-79_space)][S S S T  S S N
_Push_4_s][S S T    T   T   S N
_Push_-6_i][S S T   T   T   T   N
_Push_-7_h][S S T   T   T   S T T   N
_Push_-27_T][N
S S N
_Create_Label_LOOP][S S S T T   S T T   T   T   N
_Push_111][T    S S S _Add][T   N
S S _Print_as_character][N
S N
N
_Jump_to_Label_LOOP]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.
Try this highlighted version.
Whitespace is a stack-based language that ignores everything except for spaces, tabs and new-lines. Here is the same program in pseudo-code:
Push all unicode values of "P: ecapsetihW tuo srorre margorp sihT", minus 111
Start LOOP
  Push 111
  Add the top two stack values together
  Print as character
  Go to the next iteration of the LOOP

It will error as soon as it's done printing all values and the stack is empty when it tries to do the Add (TSSS), which requires two items on the stack.
I've generated the constant 111 with this Java program, which I've also used for previous ASCII-related challenges I've made in Whitespace. In addition, I've used some copies for the spaces to save bytes.
One important thing to note is the trick I've used to place the Java program within the Whitespace answer. Let me start by explaining how a number is pushed in Whitespace:
S at the start: Enable Stack Manipulation;
S: Push what follows as Number;
S or T: Positive or Negative respectively;
Some S and/or T, followed by an N: Number as binary, where T=1 and S=0.
Here some examples:

Pushing the value 1 will be SSSTN;
Pushing the value -1 will be SSTTN;
Pushing the value 111 will be SSSTTSTTTTN.
Pushing the value 0 can be SSSSN, SSTSN, SSSN, SSTN, SSSSSSSSSSSSN, etc. (When you use SSSN (or SSTN), we don't have to specify the binary part, because it's implicitly 0 after we've stated its sign.)

So just SSSN is enough for pushing the value 0 (used for the letter o in this case). But, to place the Java program in this golfed Whitespace program, I needed an additional space, so the first two os are pushed with SSSN, but the third one is pushed with SSSSN, so we have enough spaces for the sentence of the Java program.

CBM BASIC and 6502 machine code (C64), 142 144 bytes
Had to add 2 bytes after realizing a syntax error wasn't allowed ....

Hexdump of .prg file:
01 08 50 08 00 00 8F 5A 49 52 49 41 A9 17 8D 18 D0 A2 30 BD 30 08 20 D2 FF E8
E0 4B D0 F5 A2 30 BD 05 08 20 D2 FF E8 E0 44 D0 F5 A9 0D 20 D2 FF A2 1A 4C 37
A4 22 36 35 30 32 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 3A D0 22 20 20 20
20 20 00 8D 08 01 00 97 35 33 32 37 32 2C 32 33 3A 99 22 D4 48 49 53 20 50 52
4F 47 52 41 4D 20 45 52 52 4F 52 53 20 4F 55 54 20 49 4E 20 C3 C2 CD 2D C2 C1
D3 C9 C3 20 3A D0 22 2C 58 AD 50 00 00 00

The CBM BASIC view, as listed in the C64's editor:
0 remziriastepgosubinput#new0exp0 dim.clrsavekinput#stepnew0exp<white> dim.clrsavedinput#stepstep
 dim.newl7to"6502 machine code :P"
1 poke53272,23:print"This program errors out in CBM-BASIC :P",x/p

Attention: It's impossible to correctly enter this program in the BASIC editor. Don't even try to edit this program in the BASIC editor, it will crash. Still, it's a runnable BASIC program ;)

The 6502 machine code view:
         01 08                          ; load address

.C:0801  50 08       BVC $080B          ; jump to real start of mc

         ; line number (00 00), REM (8F) and "ziria"
.C:0803  00 00 8F 5A 49 52 49 41

.C:080b  A9 17       LDA #$17
.C:080d  8D 18 D0    STA $D018          ; set upper/lower font
.C:0810  A2 30       LDX #$30
.C:0812  BD 30 08    LDA $0830,X
.C:0815  20 D2 FF    JSR $FFD2          ; print "This program errors ..."
.C:0818  E8          INX
.C:0819  E0 4B       CPX #$4B
.C:081b  D0 F5       BNE $0812
.C:081d  A2 30       LDX #$30
.C:081f  BD 05 08    LDA $0805,X
.C:0822  20 D2 FF    JSR $FFD2          ; print "6502 machine code :P"
.C:0825  E8          INX
.C:0826  E0 44       CPX #$44
.C:0828  D0 F5       BNE $081F
.C:082a  A9 0D       LDA #$0D
.C:082c  20 D2 FF    JSR $FFD2          ; print a newline
.C:082f  A2 1A       LDX #$1A           ; error code for "can't continue"
.C:0831  4C 37 A4    JMP $A437          ; jump to error handling routine

.C:0834  22 ; '"'

         ; "6502 machine code :P"
.C:0835  36 35 30 32 20 4D 41 43 48 49 4E 45 20 43 4F 44 45 20 3A D0

         ; '"', some spaces, and next BASIC line
.C:0849  22 20 20 20 20 20 00 8D 08 01 00 97 35 33 32 37 32 2C 32 33 3A 99 22

         ; "This program errors out in CBM-BASIC :P"
.C:0860  D4 48 49 53 20 50 52 4F 47 52 41 4D 20 45 52 52 4F 52 53 20 4F 55 54
.C:0877  20 49 4E 20 C3 C2 CD 2D C2 C1 D3 C9 C3 20 3A D0

.C:0887  22 2C 58 AD 50 00 00 00

Online demo, type run to run as BASIC, sys 2049 to run as machine code, list to show it interpreted as BASIC code.
Running as BASIC produces a division by zero  error in 1, running as machine code a can't continue  error

Explanation:
The first two bytes of a .prg file are the load address in little endian, this is $0801 (decimal 2049) here, which is the start address for BASIC programs on the C64. run starts this program in the BASIC interpreter, while sys 2049 is the command to run a machine code program at address 2049.
As you can see, the first line in the BASIC view is a comment (rem) containing "garbage" and part of the required output string. This is the machine code program and some filler bytes. You see some "random" BASIC commands there because CBM-BASIC programs contain the commands "tokenized" as single byte values, and some of these values are the same as opcodes used in the machine code. The machine code reuses the string present in the second line of code for its output.
The first two bytes of a line of a basic program are a pointer to the next line, here $0850. This is carefully chosen because 50 08 is also a 6502 branch instruction jumping over the next 8 bytes when the overflow flag is not set -- this is used to jump somewhere in the middle of this "comment" line when executed as machine code. The 50 is the opcode used here, so the second line has to start at 0850 for the trick to work. That's why you see a sequence of 5 20 bytes (space characters) to fill up. The machine code actively jumps to the ROM error handling routine to give a "can't continue" error.
The BASIC code is pretty straightforward; as a second argument to "print", two uninitialized variables (having a value of 0 in CBM BASIC) are divided, triggering the "division by zero" error.

You, sir, are a Real Programmer. How did you come up with this? Atari programming?

@Orion thanks :) Basically, I started with the second line entered as normal BASIC, moved it out of the way using the machine code monitor built into vice (emulator), assembled the machine code directly to ram and manually repaired the line pointers of the basic program...

Attache + Wolfram Language (Mathematica), 82 bytes
s:="Attache"
s=" Mathematica "
Throw[Print["This program errors out in",s,":P"]-0]

Try Attache online! Try Mathematica online!
This pivots upon the meaning of the operator = in the two languages. In Attache, it compares for equality, but in Mathematica, it performs variable assignment. := does variable assignment in both languages.
Now, in Attache, Print returns an array of strings printed, and subtraction is not possible with strings and integers (namely, 0). So, a type error is thrown. In Mathematica, Print returns Null, and Mathematica is just fine subtracting 0 from that. But, we manually throw that null with Throw, giving a nocatch error.

note: this doesn't work for current versions of attache due to a bug. I'll try to fix that soonish

C and Python, 126 116 bytes
-10 bytes thanks to @Bubbler!
#1/*
-print("This program errors out in Python :P")
'''*/
main(c){c=puts("This program errors out in C :P")/0;}//'''

In Python print() is a None, so trying to get its negative doesn't make sense, so Python throws an error.
In C printf() returns an int, so dividing it by zero gives a floating point exception.
Try it in C!
Try it in Python!

You can use -print(...) to raise a TypeError in Python, and then you're free to make Floating Point Error (division by zero) in C. Combined with some redundant newlines, here is 116 bytes (Python, C).

Python (2) and QB64, 82 bytes
1#DEFSTR S
s="QB64"
'';s="Python"
print"This program errors out in "+s+" :P"
CLS-1

To test the Python version, you can Try it online! To test the QB64 version, you'll need to download QB64.
What Python sees
1#DEFSTR S
s="QB64"
'';s="Python"
print"This program errors out in "+s+" :P"
CLS-1

The first line is just the bare expression 1 (a no-op) followed by a comment.
The second line sets s to the string "QB64", but the third line immediately changes it to "Python". The fourth line prints the message accordingly.
The fifth line is another bare expression, but it raises a NameError because of the undefined name CLS.
What QB64 sees
1#DEFSTR S
s="QB64"
'';s="Python"
print"This program errors out in "+s+" :P"
CLS-1

The first line, numbered 1#, defines every variable whose name starts with S (case-insensitive) as a string variable. This means we don't have to use s$, which would be a syntax error in Python.
The second line sets s to the string "QB64". ' starts a comment in QB64, so the third line doesn't do anything. The fourth line prints the message accordingly.
The fifth line tries to CLS (clear screen) with an argument of -1. But since CLS only accepts arguments of 0, 1, or 2, this produces the error Illegal function call. The error creates a dialog box asking the user if they want to continue execution or abort. Technically, this means the error isn't fatal (in this case, you can pick "continue execution" and the program simply ends without further problems); but the OP has explicitly allowed languages that can continue after an error, so QB64's behavior should be fine.

Jelly and M, 39 bytes
İ=`ị“¢³ƥ“Ȥ¹»;“ :P”“¢ḅñ⁵ẹḞŀẊịñṙȧṄɱ»;ȮṠṛƓ

Try it in Jelly!
Try it in M!
Both languages apply inverse İ to 0 which results in inf for Jelly and zoo for M. I don't know why zoo represents infinity in M. Ask Dennis.
The important difference is that Jelly's infinity is equal to itself while M's infinity is not. Thus the "is equal to itself" monad =` yields 1 in Jelly and 0 in M. From here:
İ=`ị“¢³ƥ“Ȥ¹»;“ :P”“¢ḅñ⁵ẹḞŀẊịñṙȧṄɱ»;ȮṠṛƓ
İ=`                                      0 in M, 1 in Jelly
    “¢³ƥ“Ȥ¹»                             Pair of compressed strings: [' M',' Jelly']
   ị                                     Index into this list with 0 or 1
            ;“ :P”                       Concatenate with the string ' :P'
                  “¢ḅñ⁵ẹḞŀẊịñṙȧṄɱ»       Compressed string: 'This program errors in'
                                  ;      Prepend this to ' Jelly/M :P'
                                   Ȯ     Print the string and return it
                                    Ṡ    Sign. M errors with a string as input and terminates
                                         Jelly returns a list of Nones
                                     ṛ   Right argument. This prevents the list of Nones from being printed
                                      Ɠ  Read a single line from input. Since input is not allowed, this produces an EOFError

Jelly's error is EOFError: EOF when reading a line.
M's error is TypeError: '>' not supported between instances of 'str' and 'int'.

How do you even begin to do this in two esolangs?

zoo stands for $z\infty$, where $z$ means "complex", and oo looks like $\infty$.

C++ 14 (gcc) / C++ 17 (gcc), 107 105 bytes
#include<cstdio>
int*p,c=*"??/0"/20;int
main(){*p=printf("This program errors out in C++ 1%d :P",4+c)/c;}

Try it online! (C++14)
Try it online! (C++17)

Assumes that <cstdio> declares printf in the global namespace (in addition to std) and that the basic execution character set uses ASCII values, which are both true using g++ on Linux.
The basic catch here is that C++17 eliminated trigraphs from the language.
In C++14, "??/0" contains a trigraph and is equivalent to "\0".  So *"??/0" is zero, and c is set to zero.  The number 4 is passed as an argument to printf, then the division by c causes undefined behavior.  On Linux, this happens before *p comes into the picture, and the program gets a SIGFPE.
In C++17, "??/0" is exactly the length 4 string it appears to be.  So *"??/0" is '?' or 63, and c is set to 3.  The number 7 is passed as an argument to printf, and this time the division by c is valid.  Since p is a namespace member, it gets zero-initialized at the start of the program and has a null pointer value, so *p is undefined behavior.  On Linux, because the program attempts to modify memory at address zero, the program gets a SIGSEGV.

main's return type can be omitted, so -3 bytes.

Octave and MATLAB, 67 bytes
v=ver;disp(['This program errors out in ' v(1).Name ' :P']);v(--pi)

Try it online!
Notes: The code assumes MATLAB is installed with no toolboxes (or that the names of any toolbox that is installed don't start with letters A to M).
How it works:
The code gets the version data for the interpreter and toolboxes using ver. Running v(1).Name extracts the name of the first product, this will return either Octave or MATLAB assuming the note above holds true.
The program will then display the required string, complete with Octave or MATLAB as required.
Finally we do v(--pi).
In Octave, -- is the pre-decrement operator. As such it attempts to pre-decrement which fails as the variable pi doesn't exist (pi is actually function, not a variable).
This program errors out in Octave :P
error: in x-- or --x, x must be defined first

In MATLAB, the pre-decrement operator doesn't exist. As such the statement is interpreted as v(-(-pi)) which is equal to just v(pi). However pi is not an integer, so cannot be used to index into the v array, giving an error.
This program errors out in MATLAB :P
Subscript indices must either be real positive integers or logicals.

Perl 5 and JavaScript (Node.js), 96 bytes
eval("printf=console.log");printf("This program errors out in %s :P",("Perl","JavaScript"));$//0

This makes use of the fact that (...) is a list in Perl that printf will use the leftmost element of and the fact that it's the comma operator in JavaScript, which will return the rightmost argument.
Causes a division by zero error in Perl and a ReferenceError because $ is not defined in JavaScript.
Try the Perl online!
Try the JavaScript online!

Haskell, Python3, JavaScript(Node.js), 195 Bytes
j=1
y="This program errors out in "
--j//1;Error=print
--j;Error(y+"Python :P");eval("console.log(y+`JavaScript :P`);e");j//2;"""
1//0=do print (y++"Haskell :P");putChar$""!!1
main=1//0
--j //"""

Error Messages
Python - Syntax Error due to the ` in the EVAL
Haskell - Index too large (""!!1)
JavaScript - Reference Error (e is not defined)

PHP 7+ / JavaScript, 90 89 bytes
This uses 2 languages with very similar syntax, allowing to write this code on both languages.
The language separation is done by a property not present in JavaScript: PHP considers [] (empty array) to be a falsy value while it is truthy in JavaScript (because it is an object and objects are always truthy, even new Boolean(false)).

$X='This program errors out in %s :P';([]?console.log($X,'JavaScript'):printf($X,PHP))();

Execution:
Will focus on the following piece of code: ([]?console.log($X,'JavaScript'):printf($X,PHP))();.
The string attribution works the same in both languages.
This code uses the "ternary operator" (Javascript, PHP), which works mostly the same way in both languages.
Javascript
Javascript will run the console.log($X,'JavaScript') piece, which returns undefined.
Later on, when you try to execute (...)(), you get an Uncaught TypeError: (intermediate value)(intermediate value)(intermediate value) is not a function (in Google Chrome).
PHP
PHP will execute the printf($X,PHP) piece.
In PHP, the printf function returns the length of the output.
PHP has an interesting functionality: it can execute functions who's name is stored in a variable (or, since PHP7, as the result of an expression), which prevents a syntax error.
PHP then will try to run the function who's name is the result of the expression []? ... :printf($X,PHP) (which is the number 33).
But that interesting functionality has a caveat: only accepts strings (duh!).
This causes a Fatal error:  Function name must be a string, because 33 is an int.

Thanks to Shieru Asakoto for saving me 1 byte!

[] is shorter than '0' and also evaluated differently in JS and PHP, so maybe a -1 byte here?

I have plenty of questions with that issue, where [] needs to be used instead of '0', '\0', '\0'=="0", and used that [] before as well. But thank you for spotting this question.

Perl 5 and Perl 6, 55 bytes
say('This program errors out in Perl ',5-~-1,' :P').a/0

Try Perl 5 online! (Illegal division by zero)
Try Perl 6 online! (No such method)
Prefix ~ is stringification in Perl 6 and essentially a no-op in the program above. In Perl 5, it's bitwise not, converting -1 to 0.
. is method call syntax in Perl 6 and concatenation in Perl 5.

Java and C# 242 235
/**\u002f/*/using System;/**/class G{public static void/**\u002fmain/*/Main/**/(String[]a){String s="This program errors out in ";/**\u002fSystem.out.print(s+"Java :P");/*/Console.Write(s+"C# :P")/**/;s=/**\u002f(1/0)+""/*/a[-1]/**/;}}

Abusing different escape handling between java and C# (unicode escapes are parsed before code parsing in java and not in c#) as a sort of preprocessor, thats the job of the \u0027 magic, rest are some "toggle-comments"
Edit: Golfed off 8 bytes thanks to a pointer of @KevinCruijssen
Edit: Rule derp fixed

You can golf 6 bytes by changing both String in var (Java 10 supports this). (Or 5 by changing String s="..."; to String s="...",x; and remove String in front of x= in Java 9 or before).

reusing the S-string works, too for java99 and before. @KevinCruijssen

Python and Lua, 111 110 102 98 95 85 bytes
x="This program errors out in ",#[[
print(x[0]+"Python :P")
a#]]z=#print(x.."Lua :P")

Errors:
Python 3:
Traceback (most recent call last):
  File ".code.tio", line 3, in <module>
    a#]]z=#print(x.."Lua :P")
NameError: name 'a' is not defined

Lua:
lua: .code.tio:3: attempt to get length of a nil value
stack traceback:
    .code.tio:3: in main chunk
    [C]: in ?

Clearly distinct.
Abuses multiple differences:

<var>=<a>,<b>,... creates a tuple in Python, but in Lua it creates an argument list, from which only the first member is taken.
# starts a comment in Python, but is the length operator in Lua. Extra props to Python for allowing tuples to end in a comma.
[[...]] is Lua's multiline string syntax, meaning it doesn't even see Python's print function; this is necessary due to Lua using .. for string concatenation and not +.
Python errors after seeing a, an undefined variable; Lua after z=#print(x.."Lua :P"). Using just #print(x.."Lua :P") for Lua doesn't work, as that raises an error before the code is even executed.

Edits:

No need to use "".join in Python, -1 byte
Make x a string in both languages and place Python in a string literal in the print function, -8 bytes
Using #[[]] is shorter than #"" and --[[]], -4 bytes
No need to use #1 as a table key, -3 bytes
Jo King did this, -9 bytes
Taking the length of the return value of print(x.."Lua :P") works, apparently; -1 byte

86 bytes

AutoHotKey / C#, 155 133 128 122 bytes
Syntax highlighting explains it better than I could:
C# RuntimeBinderException: 'Cannot invoke a non-delegate type'
;dynamic
i="This program errors out in " ;Console.Write(i+"c# :P");i();/*
i:=SubStr(i,2,27)
send %i%AutoHotkey :P
Throw */

AutoHotkey Error: An exception was thrown.
;dynamic
i="This program errors out in " ;Console.Write(i+"c# :P");i();/*
i:=SubStr(i,2,27)
send %i%AutoHotkey :P
Throw */

Edits:

removed a var
-5 bytes thanks to milk

Here's a slightly shorter exception to throw in C#: i+=i[-1]. System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'

Slightly shorter still to use dynamic instead of var and throw Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Cannot invoke a non-delegate type' with i().

C (gcc)/Stax, 109 bytes
AA=~1;
	char* s;main(){*(int*)(printf("%s C :P",s))=0;}char* s=
"This program errors out in";;;/*dp`UGYC\`Q*/

Try it online! (C (gcc))
Try it online! (Stax) or Run and debug it! (Stax)
Segfault in C. Invalid operation in Stax. I love how everything that is not a comment is actually used in Stax.
C
This is how C sees it. The first line is no-op. The second line prints the message with printf and then segfaults due to the =0.
AA=~1;
	char* s;main(){*(int*)(printf("%s C :P\n",s))=0;}char* s=
"This program errors out in";;;/*dp`UGYC\`Q*/

Stax
Stax program terminates whenever it tries to pop or peek from empty stack. This makes it a little bit tricky and we have to prepare a stack that is not empty. AA=~1; does this while remaining a valid statement in C.
AA=~1;
AA=       10=10, returns a 1
   ~      Put it on the input stack
    1     Pushes a 1 to main stack (*)
     ;    Peek from the input stack (**)

What is really useful is the ~, it prepares a non-empty input stack so that the ; can be executed without exiting the program. However, the two 1s on the main stack are also used later.
The second line begins with a tab and starts a line comment in Stax.
"...";;;/*dp`UGYC\`Q*/
"..."                     "This program errors out in"
     ;;;                  Peek the stack three times so that we have enough operands for the next two operations
        /                 Divide, this consumes one element of the main stack
         *                Multiply, this consumes another element
          d               Discard the result, now the TOS is the string
           p              Pop and print without newline
            `UGYC\`       Compressed string literal for " Stax :P"
                   Q      Print and keep the string as TOS
                    *     Duplicate string specific times
                          Since the element under the top of stack is `1` that was prepared in (**), this does nothing
                     /    Invalid operation error

The invalid operation is trying to perform / operation for a string as the TOS (2nd operand) and the number 1 from (*) as the 1st operand, which is invalid.
If the two operands are swapped, it would be a valid operation in Stax.

Foo / CJam, 51 50 bytes
"This program errors out in ""Foo"/'C'J'a'm" :P"Li

This exits with a divide-by-zero error in Foo, and a NumberFormatException in CJam.
To CJam:

A string literal (between quotes) pushes itself to the stack. Items from the stack are automatically printed without a separator when the program terminates.
/ tries to split the string This program errors out in  on the substring Foo. Since the string does not contain the substring, this yields a singleton array containing the original string, which displayed in exactly the same way.
'x is a character literal for x, which is printed the same way as a one-character string. This way, we can push data for CJam that is ignored by Foo (I haven't figured out how to make a loop not execute in Foo).
Li tries to cast the empty string to an integer, which fails. Everything from the stack is printed.

To Foo:

A string literal (between quotes) prints itself.
/ tries to divide the current cell by the top stack element (which is an implicit 0). For some reason, divide-by-0 errors aren't fatal in Foo, so this just prints the message

Only Chuck Norris can divide by zero.

to STDERR and keeps going.
Unrecognized characters ('C'J'a'm and Li) are ignored.

Isn't the latter 50 bytes?

@Bubbler Forgot to edit that, sorry.

I think there's a bug in the Foo interpreter. It should obviously error with Only Jon Skeet can divide by zero. https://meta.stackexchange.com/a/9138

05AB1E and Python 3, 89 bytes
print("\"}\"This program errors out in Python :P\""[3:-1]);'")н”±¸ :P\”"05AB1E :P":,õι';a

Try it online! (05AB1E)
Try it online! (Python 3)
05AB1E
print("\"}\"This program errors out in Python :P\""[3:-1]);'")н”±¸ :P\”"05AB1E :P":,õι';a  # full program
print("\"}\                                                                                # a bunch of nops
           "This program errors out in Python :P\"                                         # push literal (in 05AB1E, backslashes are not escape characters)
                                                  "[3:-1]);'"                              # push literal
                                                                                :        # replace all instances of...
                                                               ”±¸ :P\”                    # "Python :P\"
                                                                                :        # in...
                                                              н                            # first element of...
                                                             )                             # stack as a list (left of list is bottom of stack)...
                                                                                :        # with...
                                                                       "05AB1E :P"         # literal
                                                                                ,       # output explicitly to prevent the error from stopping implicit output
                                                                                ι     # attempt to use...
                                                                                õ      # empty string...
                                                                                ι     # as index "step" value in uninterleave, resulting in an error

Error
** (RuntimeError) Could not convert  to integer.
    (osabie) lib/interp/functions.ex:101: Interp.Functions.to_integer!/1
    (osabie) lib/interp/commands/special_interp.ex:113: Interp.SpecialInterp.interp_step/3
    (osabie) lib/interp/interpreter.ex:127: Interp.Interpreter.interp/3
    (osabie) lib/osabie.ex:62: Osabie.CLI.main/1
    (elixir) lib/kernel/cli.ex:105: anonymous fn/3 in Kernel.CLI.exec_fun/2

Python 3
print("\"}\"This program errors out in Python :P\""[3:-1]);'")н”±¸ :P\”"05AB1E :P":,õι';a  # full program
print("\"}\"This program errors out in Python :P\""                                        # print string "}"This program errors out in Python :P" (including quotes)...
                                                   [3:-1]);                                # not including the first 3 characters and the quote at the end
                                                           '")н”±¸ :P\”"05AB1E :P":,õι';   # string literal (nop)
                                                                                a  # references an undefined variable, resulting in an error

Error
Traceback (most recent call last):
  File ".code.tio", line 1, in <module>
    print("\"}\"This program errors out in Python :P\""[3:-1]);'")”±¸ :P\”"05AB1E :P":,õι';a
NameError: name 'a' is not defined

Forth (gforth) and Vim, 76 bytes
.( This program errors out in Forth :P ) <esc>0iThi<esc>:s/F.*/Vim :P<cr>:!a

Try it in Forth!
Try it in Vim!
In Forth, .( This program errors out in Forth ) prints the necessary message and the rest just makes it blow up because it's an undefined word.
In Vim, that first part writes s program errors out in Forth :P )  to the buffer, 0iThi puts Thi at the start of the line, and :s/F.*/Vim turns that last part into Vim :P instead of Forth :P ). :!a simply tries to run a command named a and errors because it doesn't exist.

Perl 5 and C, 95 bytes
//;$_='
main(){puts(puts("This program errors out in C :P"));}//';/T.*n /;print$&,"perl :P";die

//; is basically a NOP in perl, and is a comment in C.
So the C program is effectively:
main(){puts(puts("This program errors out in C :P"));}

Which prints the required string, then tries to run puts(32). This is technically undefined behavior in C, but it causes a segmentation fault on TIO and every system I have access to.
The perl program treats the whole C program as a string, uses the regex /T.*n / to match This program errors out in  and then prints that and perl :P. die causes the program to crash with the error Died at script_name line 2.
If you don't like that as an error, 1/0 is the same length and crashes with an Illegal division by zero error. I just like die more ;)
Try it online! (C)
Try it online! (Perl)

VBScript, JScript, 72 bytes
x="VB"
'';x='J'
WScript.echo("This program errors out in "+x+"Script")
y
VBScript will print "Microsoft VBScript runtime error: Type mismatch: 'y'"
JScript will print "Microsoft JScript runtime error: 'y' is undefined"

Java (JDK)/JavaScript (Node.js), 154 bytes
class P{P(){var s="This program errors out in ";try{System.out.printf("%sJava :P",s);}finally{if(1!='1'){var a=0/0;}throw new Error(s+"JavaScript :P");}}}

Try it online! (Java)
Try it online! (JavaScript)
Output in Java:
This program errors out in Java :P
Exception in thread "main" java.lang.ArithmeticException: / by zero
    at P.(Main.java:1)

Output in JavaScript (to stderr):
Error: This program errors out in JavaScript :P
    at P (/home/runner/.code.tio:1:185)

This takes advantage of JavaScript's weak typing (1=='1') to detect the language, and the same keywords in Java and JavaScript (var,class), and the similar error constructors (new Error()) to make the polyglot.

JavaScript & Python 3, 105 91 bytes
Errors by NameError: name 'console' is not defined in Python 3
a="This program errors out in %s :P"
1//2;print(a%"Python 3")
console.log(a,"JavaScript")()

Try it online!
... and by TypeError: console.log(...) is not a function in JavaScript.
a="This program errors out in %s :P"
1//2;print(a%"Python 3")
console.log(a,"JavaScript")()

Try it online!

PowerShell v6 and PowerShell v2, 73 bytes
"This errors out in PowerShell v$($PSVersionTable.PSVersion) :P"
1-shl1/0

Try it online!
This will throw a parsing error on v2 because -shl was introduced in v3. v3+ will then be able to correctly shift the value before attempting to divide it by 0, conveniently throwing a division-by-zero error. Both versions have the $PSVersionTable hashmap which contains the PSVersion field

Python 3 / Befunge-98 (FBBI), 75 bytes
r='=,k1'"This program errors out in Befunge :P"
-print(r[4:31]+"Python :P")

Raises a TypeError in Python and a segmentation fault in Befunge.
Try it online! (Python)
Try it online! (Befunge)
Python
r='=,k1'"This program errors out in Befunge :P"

r=                                                        #Declare variable
  '=,k1'                                                  #String literal
        "This program errors out in Befunge-98 (FBBI) :P" #Another string literal
                                                          #Concatenating string literals joins the two strings together.

-print(r[4:31]+"Python :P")

       r[4:31]                                            #Extract the relevant part of the output
              +"Python :P"                                #Change the language name to "Python"
 print(                   )                               #Print the string and return None
-                                                         #Unary negation

Apparently, consecutive string literals (such as '1'"2") are valid in Python.
The print function, after printing its input ("This program errors out in Python :P"), returns None. The program attempts to negate that with -, which raises a TypeError:
Traceback (most recent call last):
  File ".code.tio", line 2, in <module>
    -print(r[4:31]+"Python :P")
TypeError: bad operand type for unary -: 'NoneType'

Befunge
r  =,k1'"This program errors out in Befunge :P"

r                                               #Reverse direction
        "This program errors out in Befunge :P" #String literal (backwards)
      1'                                        #Push 49
     k                                          #Repeat that many (49) times:
    ,                                           #Output the last character
   =                                            #System-execute the top of the stack ("")

After using '1k, to print "This program errors out in Befunge :P", the stack is empty. = does a system-execute call, passing the string on top of the stack (which is empty) to the interpreter. FBBI implements this using a C system() call, so it calls system(""), which leads to a segmentation fault:
/srv/wrappers/befunge-98: line 3:  6033 Segmentation fault      (core dumped) /opt/befunge-98/bin/fbbi .code.tio "$@" < .input.tio

Vyxal / Javascript, 78 bytes
a=`This program errors out in `
0
0n/*_‛₴ŀ+,i#*/;console.log(a+'Javascript');g

Try it Online in Vyxal!
Try it online in JS!
Backticks delimit a string in both Vyxal and JS. The difference is, in Vyxal, we're pushing it to the stack, whereas in JS, we're assigning it to the variable a. a= pushes 1 to the stack in Vyxal, but this doesn't matter.
Then, we push some values (0, 0, and n which is 0 when not in a function) so that /* in Vyxal doesn't do anything to the string we have prepared. We can't use ; at any point that is executed by Vyxal because it will throw a parse error - ; closes structures in Vyxal, and if there's nothing to close...
/* is a comment in JS, so the code ‛₴ŀ+← appends the compressed string 'Vyxal' and throws an error by indexing 0 into 1 - i is very finicky. # is a comment in Vyxal, so after the */, we can run whatever we want in JS and Vyxal won't do anything about it. We simply append 'Javascript' to a and output that, then error by referencing an undefined variable.

Aww, you nearly qualified for this bounty!

@user Oh well :p

Vyxal and  JavaScript (V8), 59 bytes (Vyxal SBCS)
print`This program errors out in Javascript`;DD//_‛›ṅ‛₴ŀV,/

Try it Online! Try it online!
I'm quite proud of this one - I think I've managed to make the two parts integrate quite nicely.
In JavaScript, this simply prints "This program errors out in Javascript", then tries and fails to access the DD variable. the rest of the code is hidden in a comment.
In Vyxal, print does nothing important, then the string is pushed. The same DD that errors in JS lets the string survive through the // in Vyxal, resulting in something that gets popped leaving behind the string. Then, Javascript is replaced with Vyxal, and printed, then an error is thrown by attempting to split the remaining copy of the string into 0 chunks.

Perl, Bash (78 bytes)
printf "This program errors out in ";eval 'echo Bash :P'||print"Perl :P
";
a()

Output in Perl:
This program errors out in Perl :P
Undefined subroutine &main::a called at /tmp/perlbash line 3.

Output in Bash:
This program errors out in Bash :P
/tmp/perlbash: line 4: syntax error: unexpected end of file

(Note that Bash is indeed displaying the line 4 error, despite the fact that line 3 does not end with a line feed...)

C(gcc) on Linux/C(gcc) on Mac (160)
#include <sys/utsname.h>
main(){struct utsname n;float g;uname(&n);printf("This program errors out in C(gcc) on %s :P\n",n.sysname);g=1/(int)gamma(1);abort();}

Untested on Mac; basically, John Cook pointed out (in his blog) that POSIX doesn't define gamma; Linux uses the log of the gamma function (log(gamma(1)) will return 0 which will trigger a floating point exception); OSX uses the "true" gamma function, (which is officially called tgamma per POSIX); this returns 1 which will then hit the abort statement; I tried to get it to throw a different floating point error (e.g. sqrt(-1) but I'm forgetting how to make that throw an error vs just return zero)

C and ECPP, 112 bytes
#ifdef ECPP
#replace "C" "ECPP"
#endif
main(){puts("This program errors out in " "C" " :P");raise(strlen("C"));}

Try it online! (C) Throws error 1, Hangup.
Try it online! (ECPP) Throws error 4, Illegal instruction.

C (gcc) and Haskell, 135 bytes
char/*x=0-- */*
s="This program errors out in ";
int main(){--s;*s=printf("%sC :P",s+1);}//-}=0;main=mapM print[s++"Haskell :P",tail""]

Try it online (С)!
Try it online (Haskell)!
The result is achieved by interweaving the comments, the C version being essentially this:
char * s = "This program errors out in ";
int main ()
{
   --s;
   *s = printf ("%sC :P", s + 1);
}

(Failure is achieved by writing before the beginning of the string).
Haskell version, on the other hand, reduces to the following:
char /* x = 0 -- a useless operator (/*) taking two arguments
s = "This program errors out in ";
int main () = 0 -- a useless function int taking two arguments
main = mapM print [s ++ "Haskell :P", tail ""]

(Failure is achieved by taking tail of an empty list)

Ruby / Erlang, 150 115 bytes
%w();puts r=<<X[/T.*n /]+"Ruby :P";r*=-1
main([])->io:fwrite("This program errors out in Erlang :P
"),X=1/0,Y=
X
.%

Try it online:
Ruby
Erlang (escrpit)
What's happening here?
Erlang was quite easy, it's just printing out a string then performing a division by zero.
The % sign starts a single line comment in Erlang, so I could use that to mark Ruby code, by creating some nop and then appending valid code.
Ruby has to skip all the Erlang code, so I used the here-document syntax to read it all into a string. The delimiter is a valid variable name in Erlang, so that's no problem. Then I multiply the string by -1, which is an invalid argument and outputs the error message.
The last line marks the end of the Erlang function, and does not look too bad to the Ruby interpreter, which gets an error before having to interpret that anyway.

05AB1E + Groovy, 80 75 79 bytes (99 bytes UTF-8)
//“€Œ‚ë›í€Ä€† 05AB1E :P“=}q
1/{println'this program errors out in Groovy :P'}()

Try it online (05AB1E)!
Try it online (Groovy)!

Results for 05AB1E:
Output: this program errors out in 05AB1E :P
Error:
** (FunctionClauseError) no function clause matching in Interp.Stack.pop/2

    The following arguments were given to Interp.Stack.pop/2:

        # 1
        :end

        # 2
        "}"

    (osabie) lib/interp/stack.ex:12: Interp.Stack.pop/2
    (osabie) lib/osabie.ex:63: Osabie.CLI.main/1
    (elixir) lib/kernel/cli.ex:105: anonymous fn/3 in Kernel.CLI.exec_fun/2

Real time: 0.373 s
User time: 0.316 s
Sys. time: 0.114 s
CPU share: 115.03 %
Exit code: 1

This occurs do to a mismatched }, it never runs the Groovy part because of q.

Results for Groovy: - Note, I updated the code but not the TIO links.
Output: this program errors out in Groovy :P
Error:
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#div.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    [class java.lang.Character]
    [class java.lang.Number]
    at Script1.run(Script1.groovy:3)
    at io.grpc.Context.run(Context.java:565)

By calling 1/null as println returns nothing.

Swift 4/JavaScript (SpiderMonkey), 105 bytes
print("This program errors out in " + ([1]==[1] ?"Swift :P":"JavaScript :P"))
var b=Int.self,a=[1]
a[2]=0

Try it online! (Swift)
Try it online! (JavaScript)
Output in Swift:
This program errors out in Swift :P
Fatal error: Index out of range

Output in JavaScript:
This program errors out in JavaScript :P
.code.tio:2:5 ReferenceError: Int is not defined
This also uses JavaScript's type system to tell the difference between the two languages.

Ink and Haskell, 104 bytes
--This program errors out in ink :P->->
main=mapM putStr["This program errors out in Haskell :P",tail""]

Try it online! (Ink, Haskell)
In ink, the first line gets literally printed except for the -- at the start, until it encounters the ->->, which means "divert back to where you entered from", and is an error here since we didn't enter from anywhere. The second line is never reached.
In haskell, the first line is a comment. The second line prints the string in question, then tries (and fails) to discard the first element of an empty list.
More interesting variant, 110 bytes
--T<>
h
 ~temp a="is program errors out in "
-- <>{a}ink :P->a
main=mapM putStr["Th",h()0,"Haskell :P",tail""]

Try it online! (Ink, Haskell)
In Haskell, if we ignore the comments, we're left with a function h which takes two parameters (matching lazily due to the ~) and returning most of the string we want to print. Then main prints the beginning of the string, then the part described be h, then the end, and then fails by trying to discard the first character of an empty string.
h ~temp a="is program errors out in "
main=mapM putStr["Th",h()0,"Haskell :P",tail""]

In ink, the T and h get printed, the third line defines a variable containing most of the string, then the fourth line prints that, then the very end of the string, then fails because it tries to divert to a variable that contains a number rather than a valid divert target.
Th
~temp a="is program errors out in "
<>{a}ink :P->a

Rust / Python 2, 128 126 124 123 bytes
#[cold]fn main(){panic!(print!("This program errors out in Rust :P"))}/*
print"This program errors out in Python 2 :P";k#*/

Try it online:
Rust,
Python
More interesting variant, 124 bytes
#[cold]fn main(){panic!(print!(/*
r="Python 2";print str.format(#*/
"This program errors out in {} :P",r#"Rust"#))}/*
);k#*/

Try it online:
Rust,
Python
Rust
Rust sees this:
#[cold]fn main(){panic!(print!(
"This program errors out in {} :P",r#"Rust"#))}

A harmless attribute is applied to main.
Unusual string literal syntax is used.
Error:
thread 'main' panicked at 'Box<Any>', code.tio:1:18
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Python
Python sees this:
r="Python 2";print str.format(
"This program errors out in {} :P",r
);k

Error:
Traceback (most recent call last):
  File ".code.tio", line 4, in <module>
    );k#*/
NameError: name 'k' is not defined

Potential improvements I don't want to make

(-2) The 2 in Python 2 is technically not required by the rules
(-1) Use #[doc] instead of #[cold] - this generates a soft error -- a warning that'll become an error in the future.

Nim & Python 2, 104 bytes
#[]#var s=""
s=("This program errors out in "#[
"Python"#]#&"Nim"&
" :P")#[
print s#]#
s.echo
s[42].echo

Try it online in Nim! Produces IndexError.
Try it online in Python! Produces AttributeError.
Uses the fact that Nim has delimited comments #[ ]#, whereas Python doesn't.

Zsh -596X and Zsh -596Xr, 44 bytes
<<<"This program errors out in Zsh -$- :P"
/
Attempt This Online! (-596X)
Attempt This Online! (-596Xr)
The first line prints the string; the special global variable $- contains the shell's current options. -596X are set by default, but I've specified that we're using Zsh with those explicitly so that the $- output is correct.
In Zsh -r, commands containing slashes are not allowed and will error with restricted. Otherwise, / is a directory and cannot be a command, so will error with permission denied.

Julia and Python, 65 bytes
~print("This program errors out in",[" Julia ","Python"][1],":P")

Julia is 1-indexed while Python is 0-indexed, allowing to chose which one to print
Julia needs spaces around its name because Python adds spaces between arguments and Julia doesn't
both error messages can seem similar but they are 2 different errors:

the Python unary ~ doesn't accept NoneType:
TypeError: bad operand type for unary ~: 'NoneType'
the Julia function ~ doesn't have the method ~(::Nothing) defined:
LoadError: MethodError: no method matching ~(::Nothing)

Try it online! (Julia)
Try it online! (Python)


text:
The next colour
Challenge
Consider the rainbow as seven colours, represented by strings as Red Orange Yellow Green Blue Indigo Violet.
Your task is to create a program that receives one of these colours as input and outputs next in order rainbow colour. This includes overlapping Violet -> Red
Input
A string containing one of rainbow colours.
Output
The next in order colour of the rainbow.
Rules

Colour names are case sensitive. They must match the case included in this post.
The input will always be valid. Any behavior is allowed for invalid input.
This is code golf, so the shortest amount of bytes wins!

Example Input and Output
Input -> Output
Red -> Orange
Orange -> Yellow
Yellow -> Green
Green -> Blue
Blue -> Indigo
Indigo -> Violet
Violet -> Red

"Provide at least one example input and output. Make sure they match your own description of what the input should look like."  Are you describing your own challenge post?  Or is this a requirement for solutions?

Do the test cases give the exact set of possible inputs? Do we have to use the same capitalization?

Are lower case colours okay?

But what happens when you reach 'gray'? ;)

@Emigna From the way OP phrased the question, I would guess that you can choose whether to do upper case, lower case, or case insensitive. Provide at least one example input and output. Make sure they match your own description of what the input should look like.

@Enigma lower case colours are not okay

Are trailing spaces okay?

The issue I have with wrapping back to the first color is that double rainbows reverse direction rather than starting over.

SOGL V0.12, 23 bytes
k‰³d∆|ΝμHō↑≥░δ÷f‘θ⁽,WIw

Try it Here!
Explanation:
...‘θ⁽,WIw
...‘        push "red orange yellow green blue indigo violet"
    θ       split on spaces
     ⁽      uppercase the 1st letter of every item (SOGLs dictionary only has lowercase words)
      ,W    get the inputs index in the array
        I   increment
         w  and get that item in the array, wrapping if necessary

JavaScript, 68 bytes
s=>'RedOrangeYellowGreenBlueIndigoVioletRed'.match(s+'(.[a-z]*)')[1]

For input "Red", this function first construct an RegExp /Red(.[a-z]*)/ to match the string 'RedOrangeYellowGreenBlueIndigoVioletRed' and then return the first capture result.

f=
s=>'RedOrangeYellowGreenBlueIndigoVioletRed'.match(s+'(.[a-z]*)')[1]

document.write('

InputOutput')
for(i='Red';;){
document.write(`<tr><td>${i}<td>${i=f(i)}`);
if(i=='Red')break;
}

What's the result for input "Violet"? I guess you should change the text to 'RedOrangeYellowGreenBlueIndigoVioletRed' or something

@OlivierGrégoire Ok, added. This rule is changed by OP after answer posted.

I didn't know: I only saw the final version of the question.

Perl 5 -p, 58 57 bytes
#!/usr/bin/perl -p
$_={(Red,Orange,Yellow,Green,Blue,Indigo,Violet)x2}->{$_}

Try it online!
Now that the challenge has been changed to be cyclic the regex solution
say RedOrangeYellowGreenBlueIndigoVioletRed=~/$_(.[a-z]+)/

isn't optimal anymore (due to the double Red)
Also 57 bytes:
#!/usr/bin/perl -p
$_=(Indigo,Blue,Violet,Yellow,Orange,Red,Green)[ord>>2&7]

Try it online!

Perl 6, 56 bytes
{<Indigo Blue Violet Yellow Orange Red Green>[.ord/4%8]}

Try it online!
Exploits the fact that bits 2-4 of the ASCII codes of each color's first letter happen to map to 0-6.
say map (*.ord +> 2) % 8, <R O Y G B I V>
# (4 3 6 1 0 2 5)

Here's a nice non-competing solution that uses "purple" instead of "indigo" and "violet" (38 chars, 59 bytes):
{''.uninames~~m/$^a.\S+.<(\S+/}

Try it online!

Almighty Unicode names

As interesting as this solution is, it ultimately doesn't follow the spec. Could you include a compliant version in you answer and post this as an addendum?

There is also a %12 solution for Coconut, but of course this is neater.

Python, 79 bytes
z="Red Orange Yellow Green Blue Indigo Violet".split()*2
dict(zip(z,z[1:])).get

Try it online!
Handles Violet -> Red. The desired function is given anonymously in the second line.

80 bytes
lambda x:"Red Orange Yellow Green Blue Indigo Violet Red".split(x)[1].split()[0]

Try it online!

Ruby -n, 62 60 bytes
-2 by Asone Tuhid.
p"RedVioletIndigoBlueGreenYellowOrangeRed"[/.[a-z]+(?=#$_)/]

Try it online!
Regex approach looks promising for Ruby too. However, I arrived at a shorter solution using a lookahead and directly printing the match, rather than playing with capturing groups. The list of colors is in reverse direction since lookahead is 1 byte cheaper than lookbehind.

very nice, -2 bytes (/#$_/ interpolates)

Red, 87 bytes
func[c][print first find/tail[Red Orange Yellow Green Blue Indigo Violet Red]to-word c]

Try it online!

No idea what this language is, whether or how your code works, or whether it's golfed at all, but have a +1 just for using a language called "Red" for this challenge.

@ msh210 It's closely related to Rebol ( Relative Expression-Based Object Language). The language represents code, data and metadata in the same manner - with blocks denoted by []. The current Red distribution is only 1.1 MB and includes a console/interpeter, as well as compiler that can cross-complie to different platforms.
My code is golfed in the sence that I tried different solutions and removed all the spaces I can. The bad thing is that the space is the delimiter almost everywhere. All math expressions need to have spaces on both sides of the operators like a: b + c (a=b+c).

05AB1E, 30 bytes
“†¾›ÈŠÛˆ¨‡—ëßigo°Íolet“#™DIk>è

Try it online!
Explanation
“†¾›ÈŠÛˆ¨‡—ëßigo°Íolet“          # push a string of colours
                       #         # split on spaces
                        ™        # title-case each
                         D       # duplicate
                          Ik     # get the index of the input
                            >    # increment
                             è   # get the element at that index

Haskell, 80 71 75 bytes
Thanks to Laikoni for shortening 9 bytes!
g x=snd(span(/=x)$words"Red Orange Yellow Green Blue Indigo Violet Red")!!1

Try it online!

Another solution, slightly more idiomatic, but I could not get it shorter:
data R=Red|Orange|Yellow|Green|Blue|Indigo|Violet deriving(Enum,Read,Eq)
succ.read

It needs to derive Read because of the requirement that the input is a string and at least Eq or Show in order to either test for equality or show the result.

71 bytes with span: Try it online!

@Laikoni Wow, that's cool, thanks! I forgot about span...

OP clarified that Violet should wrap around to Red, so you need to add Red again to the end of the string.

I like the idea of the second one a lot! However succ Violet won't work for Enums don't wrap around :(

@BMO Exactly. When I made that version I wasn't aware of the wrap-around requirement.

Java (JDK 10), 77 bytes
s->"Red Orange Yellow Green Blue Indigo Violet Red".split(s)[1].split(" ")[1]

Try it online!
Credits

-10 bytes thanks to Kevin Cruijssen
-1 byte thanks to Okx

78 bytes: s->"RedOrangeYellowGreenBlueIndigoVioletRed".split(s)[1].split("(?=[A-Z])")[0]

@KevinCruijssen That some nice regex fu that you've got!

I remembered when I once was looking for a split which keeps delimiters as separated items that the answer I found also contained options to keep the delimiter concatted as either leading or trailing part, and figured it would be useful here. :) Here is that answer including the look-ahead / look-behind for the other two options mentioned.

Save a byte: s->"Red Orange Yellow Green Blue Indigo Violet Red".split(s)[1].split(" ")[1]

Excel, 85 bytes
=CHOOSE(MOD(CODE(A1),12),"green","indigo","yellow",,,"orange","blue",,"violet","red")

Uses lowercase names.
Same approach, with Uppercase letters 86 bytes:
=CHOOSE(MOD(CODE(A1),12),"Violet","Red",,,"Green","Indigo","Yellow",,,"Orange","Blue")

Vim, 59 56 53 52 Bytes
-1 byte thanks to tsh
2IYellow Green Blue Indigo Violet Red Orange <Esc>*wywVp

2IYellow Green Blue Indigo Violet Red Orange *wywVp

Retina, 65 58 bytes
$
(.[a-z]+)
L$:`RedOrangeYellowGreenBlueIndigoVioletRed
$1

Try it online!
Explanation
$
(.[a-z]+)

We start by appending (.[a-z]+) to the input, thereby turning it into a regex which matches the input colour, immediately followed by exactly one more colour (capturing the latter).
L$:`RedOrangeYellowGreenBlueIndigoVioletRed
$1

Now the : swaps the stage's input with its own regex. So the previous result becomes the regex and it's matched against the list of colours. The (single) match gets replaced with its first capturing group (i.e. the next colour in the cycle) and returned. Output at the end of the program happens automatically.

Here is another 65-byte alternative.

Yeah, I removed my comment after seeing Kevin's solution. Having to set up \1 and jumping to the target wastes many bytes ::-)

@TonHospel found something. :)

@KevinCruijssen Thanks to your and Ton's pushing for a no-delimiter solution, I ended up finding a 58-byter. ;)

Husk, 28 bytes
S!o→€⁰w¨ṙ}ΘΞĠ«ẇ₇G²€ḃλBżḃIÿö⌉

Try it online!
Maybe there are better options for managing the arguments, but this is the best I could find
Explanation
S!o→€⁰w¨ṙ}ΘΞĠ«ẇ₇G²€ḃλBżḃIÿö⌉
       ¨ṙ}ΘΞĠ«ẇ₇G²€ḃλBżḃIÿö⌉    Compressed string with all the colors
                                "Red Orange Yellow Green Blue Indigo Violet"
      w                         Split on spaces
S                               Pass the list to both the following functions:
    €⁰                          1) Find the index of the input in the list
  o→                                  and increase it by one
 !                              2) Get the element of the list at the
                                   resulting position (indexing is cyclical)

R, 109 93 bytes
function(x){y=c("Red","Orange","Yellow","Green","Blue","Indigo","Violet");y[match(x,y)%%7+1]}

Try it online!
-16 thanks to Giuseppe for the use of match advice

welcome to PPCG! this is a nice first answer. I think match(y,x)%%7+1 is shorter for indexing than your if statement. Additionally, the builtin colors() contains a lot of color names, if you find the indices :)

oops, looks like colors() doesn't contain indigo! Ah well, still, +1!

thanks! match is better here

91 bytes

and yeah I first tried to use colors() :/

how!? I copied that from tio, let me see again

aha, cool! I just got it :D

@Giuseppe grep is your friend

Stax, 31 30 29 bytes
ÇôF┘≡▓ƒ◄╙>┘☼░⌂╪B<U[ÇQ╒eöΣQ╔÷n

Run and debug it
This uses the ring translation instruction.  It replaces each element in an array with the following one from the "decoder ring".  Usually, it's used to do character replacement in a string, but it can be used on an entire string too, if it's wrapped in a singleton array.
Here's the unpacked, ungolfed, commented ascii representation of the same program.
]   wrap input in singleton array
`5^bZ_9G*h]h%oM~X9e-0ZQJkb2`    compressed string literal with color names
:.j title case and split on spaces
:t  do ring translation

Run this one

ok... I love these languages =)

Fails for Violet -> Red

@WeijunZhou:  That test case was added after this submission.

@WeijunZhou: I fixed that test case and shaved a byte.

Not sure why, but this appears to fail on tio.

@WeijunZhou: It seems to be an inconsistency between the C# and JS implementations of stax.  I'll add a test case and normalize the behavior for the next release.

Coconut, 79 bytes
s->"# Violet Red # # Green Indigo Yellow # # Orange Blue".split()[ord(s[0])%12]

Try it online!

Don't know Coconut.  But think you should be able to cut 2 bytes by using lowercase letters, as this reduces the max modulo value: s->"# green indigo yellow # # orange blue # violet red".split()[ord(s[0])%12]

@Wernisch Thanks for the suggestion. Though I'll wait until OP has responded whether lowercase letters are acceptable before updating.

J, 67 64 62 bytes
-2 bytes thank to FrownyFrog
>:&.((cut'Red Orange Yellow Green Blue Indigo Violet Red')i.<)

Try it online!

&. actually works for this. Try it online

PHP, 92 bytes
$a=" Red   OrangeYellowGreen Blue  IndigoVioletRed";echo substr($a,strpos($a,$argv[1])+6,6)

Try it online!

Kotlin, 73 bytes
x->"RedOrangeYellow Green  BlueIndigoVioletRed".substringAfter(x).take(6)

Try it online!
Taking advantage of the fact that many colors are 6 characters, the ones that are not are prefixed with spaces to make them 6 characters long.   Hopefully it's acceptable that some of the colors are outputted with spaces before them.
e.g. Red is "   Red", Blue is "  Blue"

SmileBASIC, 94 84 bytes
C$="Red   OrangeYellowGreen Blue  IndigoViolet
INPUT I$?MID$(C$*2,INSTR(C$,I$)+6,6)

Bash + GNU Utilities, 63
grep -Po $1\\K.[a-z]+<<<RedOrangeYellowGreenBlueIndigoVioletRed

The list of colours is reversed so that a regex lookahead may be used.  The lookahead boilerplate is one byte shorter than the lookbehind boilerplate.  Of course we can do better the PCRE \K.
Try it online!

Japt, 45 43 bytes
-2 bytes thanks to Shaggy
`R‚sOÎÁƒYÁMwsGÎ9sBluƒI˜igosVio¤t`qs
g1+UbNg

Try it online!

43 bytes

@Shaggy Thanks! I forgot about N

q/kdb+, 59 55 bytes
Solution:
.[!;2 8#($)`Red`Violet`Indigo`Blue`Green`Yellow`Orange]

Examples:
q).[!;2 8#($)`Red`Violet`Indigo`Blue`Green`Yellow`Orange]"Red"
"Violet"
q).[!;2 8#($)`Red`Violet`Indigo`Blue`Green`Yellow`Orange]"Orange"
"Red"
q).[!;2 8#($)`Red`Violet`Indigo`Blue`Green`Yellow`Orange]"Blue"
"Green"

Explanation:
Create a dictionary of colour => next colour, the input is the key to the dictionary:
.[!;2 8#($)`Red`Violet`Indigo`Blue`Green`Yellow`Orange] / the solution
.[ ;                                                  ] / apply multiple args to function
           `Red`Violet`Indigo`Blue`Green`Yellow`Orange  / list of colours
         ($)                                            / convert to strings
    2 8#                                                / reshape into 2x8 grid
  !                                                     / create dictionary

Bonus:
It's 53 bytes in K4:
.[!;2 8#$`Red`Violet`Indigo`Blue`Green`Yellow`Orange]

sed, 72 bytes
s/$/%RedOrangeYellowGreenBlueIndigoVioletRed/;s/(.+)%.*\1(.[a-z]+).*/\2/

Try it Online
Example 1:
Input:
Red
Orange
Yellow
Green
Blue
Indigo
Violet

Output:
Orange
Yellow
Green
Blue
Indigo
Violet
Red

Example 2:
Input:
Indigo
Yellow
Red
Red
Blue
Green
Orange
Violet
Green
Green
Green
Blue
Blue
Violet

Output:
Violet
Green
Orange
Orange
Indigo
Blue
Yellow
Red
Blue
Blue
Blue
Indigo
Indigo
Red

Welcome to the site! Could you provide a link to an online interpreter, such as Try It Online! where we can test this solution?

@cairdcoinheringaahing: Hi, thank you very much for the welcome and the website recommendation! I've updated my answer with a link to the page where you can test the code online.

IBM/Lotus Notes Formula Language, 79 74 bytes
@Left(@Right("Red Orange Yellow Green Blue Indigo Violet Red ";a+" ");" ")

Previous version for 79:
R:=@Explode("Red,Orange,Yellow,Green,Blue,Indigo,Violet,Red");R[@Member(a;R)+1]

Takes input from an editable text field called a.
There is no TIO for formula language so here's a couple of screenshots.

Gema, 67 characters
*=@subst{*\?<J>=\?\$2\;\?=;RedOrangeYellowGreenBlueIndigoVioletRed}

Sample run:
bash-4.4$ echo -n Yellow | gema '*=@subst{*\?<J>=\?\$2\;\?=;RedOrangeYellowGreenBlueIndigoVioletRed}'
Green

bash-4.4$ echo -n Violet | gema '*=@subst{*\?<J>=\?\$2\;\?=;RedOrangeYellowGreenBlueIndigoVioletRed}'
Red

Gema, 59 characters
R=Orange
O=Yellow
Y=Green
G=Blue
B=Indigo
I=Violet
V=Red
*=

Boring one. Dumbest approach ever, but quite short.
Sample run:
bash-4.4$ gema 'R=Orange;O=Yellow;Y=Green;G=Blue;B=Indigo;I=Violet;V=Red;*=' <<< 'Yellow'
Green

bash-4.4$ gema 'R=Orange;O=Yellow;Y=Green;G=Blue;B=Indigo;I=Violet;V=Red;*=' <<< 'Violet'
Red

Ruby -n, 75 69 bytes
a=%w{Red Orange Yellow Green Blue Indigo Violet};p a[-~(a.index$_)%7]

Try it online!

Why the i&& thing? No need to check for nil, as “Ignore any errors if this is not a colour.”

@manatwork I understood it as "catch and ignore any errors" but alright.

Batch, 97 bytes
@set s=Red Orange Yellow Green Blue Indigo Violet Red
@call set s=%%s:*%1 =%%
@echo %s: =&rem %

Explanation: The call on the second line has the effect of substituting the parameter into the command and evaluating it, turning it into e.g. set s=%s:Red =%, which deletes the prefix of the string that includes the parameter. The substitution on the third line then replaces all the spaces with statement separators and comments. This works because string substitution happens before parsing.

Julia 0.6, 76 bytes
f(s)=match(Regex("$s(.[a-z]*)"),"RedOrangeYellowGreenBlueIndigoViolet"^2)[1]

Try it online!
This handles the Violet->Red by recycling the string with the power ^ operator.
Here's a slightly longer solution without regexes:
g(s,l=split("Red Orange Yellow Green Blue Indigo Violet"," "))=l[(findin(l,[s])[1])%7+1]

PowerShell, 74 bytes
(-split("Red Orange Yellow Green Blue Indigo Violet "*2-split$args)[1])[0]

Try it online!
Takes the string "Red ... Violet " and string-multiplies it out by two to properly handle the Violet -> Red test case. We then -split that string on input $args to give us an array of two strings. We take the second string thereof [1], then -split that on whitespace to give us an array of strings and take the first [0].
For example, for input "Yellow", the first step will result in @("Red Orange ", " Green Blue Indigo ... Indigo Violet "). We take the second one of that, split it on whitespace (which removes the whitespace), resulting in @("Green", "Blue", ... "Violet"), so taking the [0] one thereof results in the proper next string.

Factor, 81 bytes
[ qw{ Red Orange Yellow Green Blue Indigo Violet } [ index 1 + 7 mod ] keep nth ]

Try it online!

Red, 74 bytes
func[c][prin select[Red Orange Yellow Green Blue Indigo Violet Red]load c]

Try it online!

Swift, 121 113 bytes
let s=readLine()!;let i=["Red","Orange","Yellow","Green","Blue","Indigo","Violet"];print(i[(i.index(of:s)!+1)%7])

Try it online!

Python 3, 85 bytes
c='Red Orange Yellow Green Blue Indigo Violet'.split()
f=lambda x:c[(c.index(x)+1)%7]

Try it online!

you can golf this by reversing the order of the colours, and using index-1 instead of (index+1)%7

C (gcc) preprocessor macro, 74
Score is 74 bytes passed to the compiler.
Same idea as @nwellnhof's Perl answer.
-Df(c)=printf("%.6s","IndigoBlue  VioletYellowOrangeRed   Green"+*c/4%8*6)

Try it online!

C (gcc), 88 bytes
f(char*s){printf("%.6s",(strstr("red   violetindigoblue  green yelloworangered",s)+6));}

Try it online!

84 bytes f(int*s){write(1,strstr("red   violetindigoblue  green yelloworangered   ",s)+6,6);}

Wolfram Language (Mathematica), 84 bytes
TextWords version (84 Bytes but slow)
#/.Thread[#->RotateLeft@#&[TextWords@"Red Orange Yellow Green Blue Indigo Violet"]]&

StringSplit (86 Bytes)
#/.Thread[#->RotateLeft@#&[StringSplit@"Red Orange Yellow Green Blue Indigo Violet"]]&

Built-in color names called by number, also 86 Bytes:
#/.Thread[#->RotateLeft@#&[ColorData["HTML","Range"][[1,{114,100,139,52,10,57,135}]]]]

Try it online!

Lua, 89 bytes
c="Red   OrangeYellowGreen Blue  IndigoVioletRed"r=c:find(io.read())+6print(c:sub(r,r+5))

Outputs some trailing spaces.
Example:
input: Yellow
output: Green
space here:  ^

Try it online!
Lua, 102 bytes
c="Red   OrangeYellowGreen Blue  IndigoVioletRed"r=c:find(io.read())+6print(c:sub(r,r+5):match("%a+"))

Doesn't output any trailing spaces.
Try it online!

APL+WIN, 66 bytes
↑(c⍳⊂⎕)⌽c←'Red' 'Orange' 'Yellow' 'Green' 'Blue' 'Indigo' 'Violet'

Prompts for screen input of colour as a string.

Python 2, 89 87 bytes
def f(c):a="red orange yellow green blue indigo violet".split();print a[-~a.index(c)%7]

Test cases:
f("red") -> orange
f("orange") -> yellow
f("yellow") -> green
f("green") -> blue
f("blue") -> indigo
f("indigo") -> violet
f("violet") -> red
f("notAColour") -> Error

No, it's correct! I said to assume the input is a colour, so you don't have to implement other things

I think your modulus needs to be 7, not 6.  Also, there are a few things you can do to get down to 81. https://tio.run/##Rc6xCsIwEMbxufcUR0BooRZ0EQodxMnJB1CRtL22gZiEmFi7@OoxtaDj/e8bfmZyg1bb0FWXIPm9bjk2Oa@YpRa15aonnEhKPWJviRTW0hMK1Ype41NoSY4VDyOFS7OSn9dvXsQnvdImW@2uYRyEJNyUkHDbY4WWjzehjI9rSIwVyiE7zneJLMe4@dWTd3OOtUtj/89ZiDRYaLDQ4EuDmQYLDRYaKO32By21tx8

@lolad thanks for the clarification.

@recursive I originally missed out orange from the string, and must have forgotten to change it, thanks :)

OP specified that colors need to be uppercase.

@Laikoni Provide at least one example input and output. Make sure they match your own description of what the input should look like. I think that means that the colours can be any case, as long at it is specified in the answer

They wrote lower case colours are not okay in the comments.

Tcl, 98 bytes
puts [lindex [set L {Red Orange Yellow Green Blue Indigo Violet}] [expr ([lsearch $L $argv]+1)%7]]

Try it online!

Tcl, 98 bytes
puts [lindex [set L {Red Orange Yellow Green Blue Indigo Violet Red}] [expr [lsearch $L $argv]+1]]

Try it online!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Tips for golfing in Sesos
If you have any tips regarding golfing in Sesos, a language made by Dennis, and nobody else has covered them yet, please post them here! Only one tip is allowed per answer. Your tip should be at least somewhat specific to Sesos itself, and not just brainfuck. If your tip is relevant to brainfuck in general, you should post it here instead.

What's different in Sesos?
Golfing in Sesos is similar to golfing in brainfuck in that it has limited control flow, and that you have to grapple with the specifics of memory layout.
However, this does not mean you should write brainfuck code first and then translate it instruction-by-instruction to Sesos!
Here are some things that are different:

You barely pay for repeated commands. For example, add 1 is a 1-byte Sesos program. add 100 is a 3-byte Sesos program. add 1000 is still a 3-byte Sesos program. This means that things that would have been prohibitively expensive in brainfuck (e.g. ++++++++++) are fine in Sesos.
Unless you have set mask on, cells are not 8-bit unsigned integers—they are signed bignums. This means that you can do things like store an offset into an array as a cell without having to worry about the possibility of the array being more than 256 elements and causing overflow.
Control flow is a bit more flexible: you have do-while loops that are guaranteed to execute at least once (with the use of nop). You also have jne, which is the equivalent of ,] in a single instruction.

Omit what you can
In Sesos, you can omit some instructions, specifically:

You can omit a jmp instruction at the start of the program, if its corresponding exit point is not omitted.
You can omit a jnz instruction at the end of the program, if its corresponding entry point is not omitted.

This example program prints numbers from 10 to 1:
set numout
add 10
jmp
    sub 1
    put
jnz

However, we can reduce the SBIN file's size by a triad, therefore potentially reducing it by 1 byte, by removing the jnz:
set numout
add 10
jmp
    sub 1
    put

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/